mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-20 18:41:16 -03:00
refactor: use bytes instead of string
Some string handling functions deal with `Vec<u8>` or `&[u8]`, which have been referred to as `string` or `str` in the function names. This is confusing, since they don't deal with Rust's `String` type. Use `bytes` in the function names instead to reduce confusion. Closes #11969
This commit is contained in:
committed by
Johannes Altmanninger
parent
1fe6b28877
commit
61ee695e56
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
FLOG, FLOGF,
|
||||
common::{str2wcstring, wcs2osstring, wcs2zstring},
|
||||
common::{bytes2wcstring, wcs2osstring, wcs2zstring},
|
||||
fds::wopen_cloexec,
|
||||
path::{DirRemoteness, path_remoteness},
|
||||
wchar::prelude::*,
|
||||
@@ -64,7 +64,7 @@ pub fn create_temporary_file(name_template: &wstr) -> std::io::Result<(File, WSt
|
||||
},
|
||||
}
|
||||
};
|
||||
Ok((fd, str2wcstring(c_string_template.to_bytes())))
|
||||
Ok((fd, bytes2wcstring(c_string_template.to_bytes())))
|
||||
}
|
||||
|
||||
/// Use this struct for all accesses to file which need mutual exclusion.
|
||||
|
||||
Reference in New Issue
Block a user