Skip to content

Commit d840163

Browse files
committed
Fix lint issue
1 parent 6afb633 commit d840163

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ pub fn do_not_close_on_exit(fd: i32) -> Result<()> {
3333
.map_err(|_| Error::new(Status::GenericFailure, "fcntl failed"))
3434
}
3535

36-
fn string_ref_to_c_str(string: &String) -> Result<CString> {
37-
CString::new(string.clone()).map_err(|_| Error::new(Status::GenericFailure, "Invalid string"))
36+
fn string_ref_to_c_str(string: &str) -> Result<CString> {
37+
CString::new(string.to_owned()).map_err(|_| Error::new(Status::GenericFailure, "Invalid string"))
3838
}

0 commit comments

Comments
 (0)