Skip to content

Commit bfb20bd

Browse files
authored
Merge pull request #1887 from hermit-os/implicit_clone
fix: use clippy::string_to_string instead of clippy:implicit_clone
2 parents d497dbf + 1354e4b commit bfb20bd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ default_trait_access = "warn"
8989
explicit_deref_methods = "warn"
9090
if_not_else = "warn"
9191
ignored_unit_patterns = "warn"
92+
implicit_clone = "warn"
9293
inconsistent_struct_constructor = "warn"
9394
manual_assert = "warn"
9495
manual_let_else = "warn"
@@ -99,7 +100,6 @@ ref_as_ptr = "warn"
99100
ref_option = "warn"
100101
semicolon_if_nothing_returned = "warn"
101102
separated_literal_suffix = "warn"
102-
string_to_string = "warn"
103103
transmute_ptr_to_ptr = "warn"
104104
uninlined_format_args = "warn"
105105
unreadable_literal = "warn"

src/fs/uhyve.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use alloc::borrow::ToOwned;
21
use alloc::boxed::Box;
32
use alloc::ffi::CString;
43
use alloc::string::{String, ToString};
@@ -225,7 +224,7 @@ pub(crate) fn init() {
225224
.unwrap()
226225
.mount(
227226
&mount_point,
228-
Box::new(UhyveDirectory::new(Some(mount_point.to_owned()))),
227+
Box::new(UhyveDirectory::new(Some(mount_point.clone()))),
229228
)
230229
.expect("Mount failed. Duplicate mount_point?");
231230
}

0 commit comments

Comments
 (0)