mirror of
https://github.com/OMGeeky/twitch_data.git
synced 2025-12-26 16:27:24 +01:00
change str's to chars in replace
This commit is contained in:
@@ -745,12 +745,13 @@ fn convert_twitch_timestamp(time: Timestamp) -> DateTime<Utc> {
|
||||
fn convert_twitch_duration(duration: &str) -> chrono::Duration {
|
||||
trace!("convert_twitch_duration: {}", duration);
|
||||
|
||||
#[allow(clippy::collapsible_str_replace)]
|
||||
let duration = duration
|
||||
.replace("h", ":")
|
||||
.replace("m", ":")
|
||||
.replace("s", "");
|
||||
.replace('h', ":")
|
||||
.replace('m', ":")
|
||||
.replace('s', "");
|
||||
|
||||
let mut t = duration.split(":").collect::<Vec<&str>>();
|
||||
let mut t = duration.split(':').collect::<Vec<&str>>();
|
||||
|
||||
let secs_str = t.pop();
|
||||
let secs: i64 = match secs_str {
|
||||
|
||||
Reference in New Issue
Block a user