mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +00:00
Reverter errors from taking a &'static str to String
This commit is contained in:
parent
dc0926bab7
commit
7b44c5f7eb
10 changed files with 59 additions and 59 deletions
|
|
@ -13,13 +13,13 @@ impl TimeoutSettings {
|
|||
pub fn new(read: Option<Duration>, write: Option<Duration>) -> GDResult<Self> {
|
||||
if let Some(read_duration) = read {
|
||||
if read_duration == Duration::new(0, 0) {
|
||||
return Err(GDError::InvalidInput("Can't pass duration 0 to timeout settings".to_string()))
|
||||
return Err(GDError::InvalidInput("Can't pass duration 0 to timeout settings.".to_string()))
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(write_duration) = write {
|
||||
if write_duration == Duration::new(0, 0) {
|
||||
return Err(GDError::InvalidInput("Can't pass duration 0 to timeout settings".to_string()))
|
||||
return Err(GDError::InvalidInput("Can't pass duration 0 to timeout settings.".to_string()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue