clippy fix
This commit is contained in:
parent
6cb4d04cef
commit
40e6da5e97
26
src/lib.rs
26
src/lib.rs
@ -43,21 +43,19 @@ SOFTWARE.
|
|||||||
//! ```rust
|
//! ```rust
|
||||||
//! use tar_no_std::TarArchive;
|
//! use tar_no_std::TarArchive;
|
||||||
//!
|
//!
|
||||||
//! fn main() {
|
//! // log: not mandatory
|
||||||
//! // log: not mandatory
|
//! std::env::set_var("RUST_LOG", "trace");
|
||||||
//! std::env::set_var("RUST_LOG", "trace");
|
//! env_logger::init();
|
||||||
//! env_logger::init();
|
|
||||||
//!
|
//!
|
||||||
//! // also works in no_std environment (except the println!, of course)
|
//! // also works in no_std environment (except the println!, of course)
|
||||||
//! let archive = include_bytes!("../tests/gnu_tar_default.tar");
|
//! let archive = include_bytes!("../tests/gnu_tar_default.tar");
|
||||||
//! let archive = TarArchive::new(archive);
|
//! let archive = TarArchive::new(archive);
|
||||||
//! // Vec needs an allocator of course, but the library itself doesn't need one
|
//! // Vec needs an allocator of course, but the library itself doesn't need one
|
||||||
//! let entries = archive.entries().collect::<Vec<_>>();
|
//! let entries = archive.entries().collect::<Vec<_>>();
|
||||||
//! println!("{:#?}", entries);
|
//! println!("{:#?}", entries);
|
||||||
//! println!("content of last file:");
|
//! println!("content of last file:");
|
||||||
//! let last_file_content = unsafe { core::str::from_utf8_unchecked(entries[2].data()) };
|
//! let last_file_content = unsafe { core::str::from_utf8_unchecked(entries[2].data()) };
|
||||||
//! println!("{:#?}", last_file_content);
|
//! println!("{:#?}", last_file_content);
|
||||||
//! }
|
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
#![cfg_attr(not(test), no_std)]
|
#![cfg_attr(not(test), no_std)]
|
||||||
|
Loading…
Reference in New Issue
Block a user