use to_string instead of to_owned where applicable
This commit is contained in:
parent
470ebc4305
commit
46913e93b9
2 changed files with 4 additions and 4 deletions
|
|
@ -62,7 +62,7 @@ impl AppState {
|
|||
if let Some(upl) = self.inner.peek_uploading() {
|
||||
if bar.length().is_none() {
|
||||
bar.set_length(upl.get_size());
|
||||
bar.set_message(upl.get_name().to_owned());
|
||||
bar.set_message(upl.get_name().to_string());
|
||||
bar.enable_steady_tick(Duration::from_millis(100));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ impl TryFrom<String> for FileID {
|
|||
.captures(&value)
|
||||
.and_then(|caps| caps.name("fid").map(|m| m.as_str()))
|
||||
{
|
||||
let result = Self(fid.to_owned());
|
||||
let result = Self(fid.to_string());
|
||||
debug!("{result:?}");
|
||||
|
||||
Ok(result)
|
||||
|
|
@ -112,8 +112,8 @@ mod tests {
|
|||
];
|
||||
|
||||
for (good, expected_fid) in cases {
|
||||
let s = good.to_string();
|
||||
let file_id = FileID::try_from(s.clone()).expect("URL should parse successfully");
|
||||
let file_id =
|
||||
FileID::try_from(good.to_string()).expect("URL should parse successfully");
|
||||
assert_eq!(
|
||||
file_id.0, expected_fid,
|
||||
"Expected `{}` → FileID({}), got {:?}",
|
||||
|
|
|
|||
Loading…
Reference in a new issue