Skip to content

Commit

Permalink
fix documentation for new _utf8 methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshowers committed May 20, 2022
1 parent 6788387 commit 933240c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ impl Utf8Path {
/// use camino::{Utf8Path, Utf8PathBuf};
///
/// let path = Utf8Path::new("/foo/test/../test/bar.rs");
/// assert_eq!(path.canonicalize().unwrap(), Utf8PathBuf::from("/foo/test/bar.rs"));
/// assert_eq!(path.canonicalize_utf8().unwrap(), Utf8PathBuf::from("/foo/test/bar.rs"));
/// ```
pub fn canonicalize_utf8(&self) -> io::Result<Utf8PathBuf> {
self.canonicalize().and_then(|path| {
Expand Down Expand Up @@ -1210,9 +1210,9 @@ impl Utf8Path {
/// use camino::Utf8Path;
///
/// let path = Utf8Path::new("/laputa");
/// for entry in path.read_dir().expect("read_dir call failed") {
/// for entry in path.read_dir_utf8().expect("read_dir call failed") {
/// if let Ok(entry) = entry {
/// println!("{:?}", entry.path());
/// println!("{}", entry.path());
/// }
/// }
/// ```
Expand Down

0 comments on commit 933240c

Please sign in to comment.