-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: clearer doc for list metakey #3666
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better not to touch our upgrade.md. How about polish our list_with
&& lister_with
API docs instead?
70fad57
to
605b55b
Compare
CI failed for doctest failed: failures:
---- core/src/types/list.rs - types::list::Lister (line 40) stdout ----
error[E0412]: cannot find type `Entry` in this scope
--> core/src/types/list.rs:41:18
|
3 | let entries: Vec<Entry> = op
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
2 + use http::header::Entry;
|
2 + use opendal::Entry;
|
2 + use opendal::raw::oio::Entry;
|
2 + use reqwest::header::Entry;
|
and 3 other candidates
error[E0425]: cannot find value `op` in this scope
--> core/src/types/list.rs:41:27
|
3 | let entries: Vec<Entry> = op
| ^^ not found in this scope
error[E0433]: failed to resolve: use of undeclared type `Metakey`
--> core/src/types/list.rs:43:11
|
5 | .metakey(Metakey::ContentLength).await?;
| ^^^^^^^ use of undeclared type `Metakey`
|
help: consider importing this enum
|
2 + use opendal::Metakey;
|
error[E0425]: cannot find value `entris` in this scope
--> core/src/types/list.rs:44:14
|
6 | for entry in entris {
| ^^^^^^ help: a local variable with a similar name exists: `entries`
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> core/src/types/list.rs:43:35
|
2 | fn main() { #[allow(non_snake_case)] fn _doctest_main_core_src_types_list_rs_40_0() {
| ----------------------------------------- this is not `async`
...
5 | .metakey(Metakey::ContentLength).await?;
| ^^^^^ only allowed inside `async` functions and blocks
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
--> core/src/types/list.rs:43:40
|
2 | fn main() { #[allow(non_snake_case)] fn _doctest_main_core_src_types_list_rs_40_0() {
| ---------------------------------------------- this function should return `Result` or `Option` to accept `?`
...
5 | .metakey(Metakey::ContentLength).await?;
| ^ cannot use the `?` operator in a function that returns `()`
|
= help: the trait `FromResidual<_>` is not implemented for `()`
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0277, E0412, E0425, E0433, E0728.
For more information about an error, try `rustc --explain E0277`.
Couldn't compile the test.
failures:
core/src/types/list.rs - types::list::Lister (line 40)
test result: FAILED. 111 passed; 1 failed; 8 ignored; 0 measured; 0 filtered out; finished in 37.97s You can reproduce locally by running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
馃挦馃挦馃挦