cargo clippy --fix

This commit is contained in:
Johann Hemmann 2024-01-18 13:59:49 +01:00
parent 1ab8c7fd27
commit fad4fa163c
178 changed files with 595 additions and 738 deletions

View file

@ -130,10 +130,10 @@ fn external_docs_doc_builtin_type() {
//- /main.rs crate:foo
let x: u3$02 = 0;
"#,
Some(&OsStr::new("/home/user/project")),
Some(OsStr::new("/home/user/project")),
Some(expect![[r#"https://doc.rust-lang.org/nightly/core/primitive.u32.html"#]]),
Some(expect![[r#"file:///sysroot/share/doc/rust/html/core/primitive.u32.html"#]]),
Some(&OsStr::new("/sysroot")),
Some(OsStr::new("/sysroot")),
);
}
@ -146,10 +146,10 @@ use foo$0::Foo;
//- /lib.rs crate:foo
pub struct Foo;
"#,
Some(&OsStr::new("/home/user/project")),
Some(OsStr::new("/home/user/project")),
Some(expect![[r#"https://docs.rs/foo/*/foo/index.html"#]]),
Some(expect![[r#"file:///home/user/project/doc/foo/index.html"#]]),
Some(&OsStr::new("/sysroot")),
Some(OsStr::new("/sysroot")),
);
}
@ -160,10 +160,10 @@ fn external_docs_doc_url_std_crate() {
//- /main.rs crate:std
use self$0;
"#,
Some(&OsStr::new("/home/user/project")),
Some(OsStr::new("/home/user/project")),
Some(expect!["https://doc.rust-lang.org/stable/std/index.html"]),
Some(expect!["file:///sysroot/share/doc/rust/html/std/index.html"]),
Some(&OsStr::new("/sysroot")),
Some(OsStr::new("/sysroot")),
);
}
@ -174,10 +174,10 @@ fn external_docs_doc_url_struct() {
//- /main.rs crate:foo
pub struct Fo$0o;
"#,
Some(&OsStr::new("/home/user/project")),
Some(OsStr::new("/home/user/project")),
Some(expect![[r#"https://docs.rs/foo/*/foo/struct.Foo.html"#]]),
Some(expect![[r#"file:///home/user/project/doc/foo/struct.Foo.html"#]]),
Some(&OsStr::new("/sysroot")),
Some(OsStr::new("/sysroot")),
);
}
@ -188,10 +188,10 @@ fn external_docs_doc_url_windows_backslash_path() {
//- /main.rs crate:foo
pub struct Fo$0o;
"#,
Some(&OsStr::new(r"C:\Users\user\project")),
Some(OsStr::new(r"C:\Users\user\project")),
Some(expect![[r#"https://docs.rs/foo/*/foo/struct.Foo.html"#]]),
Some(expect![[r#"file:///C:/Users/user/project/doc/foo/struct.Foo.html"#]]),
Some(&OsStr::new("/sysroot")),
Some(OsStr::new("/sysroot")),
);
}
@ -202,10 +202,10 @@ fn external_docs_doc_url_windows_slash_path() {
//- /main.rs crate:foo
pub struct Fo$0o;
"#,
Some(&OsStr::new(r"C:/Users/user/project")),
Some(OsStr::new(r"C:/Users/user/project")),
Some(expect![[r#"https://docs.rs/foo/*/foo/struct.Foo.html"#]]),
Some(expect![[r#"file:///C:/Users/user/project/doc/foo/struct.Foo.html"#]]),
Some(&OsStr::new("/sysroot")),
Some(OsStr::new("/sysroot")),
);
}