mirror of
https://gitee.com/openharmony/third_party_rust_scopeguard
synced 2024-11-23 06:30:18 +00:00
MAINT: Fix or ignore clippy lints
This commit is contained in:
parent
f428a2c0f8
commit
29a856b9ae
@ -47,7 +47,7 @@ How to use
|
||||
let _ = f.sync_all();
|
||||
});
|
||||
// Access the file through the scope guard itself
|
||||
file.write(b"test me\n").unwrap();
|
||||
file.write_all(b"test me\n").unwrap();
|
||||
}
|
||||
|
||||
Recent Changes
|
||||
|
@ -18,7 +18,7 @@ fn g() {
|
||||
let _ = f.sync_all();
|
||||
});
|
||||
// Access the file through the scope guard itself
|
||||
file.write(b"test me\n").unwrap();
|
||||
file.write_all(b"test me\n").unwrap();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -1,4 +1,5 @@
|
||||
#![cfg_attr(not(any(test, feature = "use_std")), no_std)]
|
||||
#![cfg_attr(feature="cargo-clippy", allow(inline_always))]
|
||||
|
||||
//! A scope guard will run a given closure when it goes out of scope,
|
||||
//! even if the code between panics.
|
||||
@ -61,7 +62,7 @@
|
||||
//! let _ = f.sync_all();
|
||||
//! });
|
||||
//! // Access the file through the scope guard itself
|
||||
//! file.write(b"test me\n").map(|_| ())
|
||||
//! file.write_all(b"test me\n").map(|_| ())
|
||||
//! }
|
||||
//!
|
||||
//! fn main() {
|
||||
|
Loading…
Reference in New Issue
Block a user