Attempt to fix Ubuntu incompatibility.

This commit is contained in:
2018-12-15 18:11:16 +01:00
parent baf07a7eaf
commit 44e5c38268

View File

@@ -5,6 +5,7 @@ use std::io::Read;
use std::str::FromStr; use std::str::FromStr;
use std::ops::Add; use std::ops::Add;
use std::ops::Sub; use std::ops::Sub;
use std::fmt::Debug;
/// Apply Erathostenes's sieve to the supplied array /// Apply Erathostenes's sieve to the supplied array
/// ///
@@ -59,7 +60,7 @@ pub fn trim_back(input: &mut Vec<u8>) {
/// This function loads the input into a string and then attempts to parse it. /// This function loads the input into a string and then attempts to parse it.
pub fn read_single_input<T>(input: &mut Read) -> T pub fn read_single_input<T>(input: &mut Read) -> T
where T: FromStr, where T: FromStr,
<T as FromStr>::Err: std::fmt::Debug <T as FromStr>::Err: Debug
{ {
let mut buf = String::new(); let mut buf = String::new();
input.read_to_string(&mut buf).unwrap(); input.read_to_string(&mut buf).unwrap();