diff --git a/src/lib.rs b/src/lib.rs index 9cb329e..b921576 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -163,7 +163,7 @@ impl Level { Ok(Self { size, player, map }) } - fn read_rle(map: String) -> std::result::Result { + fn read_rle(map: &str) -> std::result::Result { let mut n: usize = 1; Self::read( @@ -534,7 +534,7 @@ pub fn run(config: Config, rle: Option) -> Result<()> { } let map = if let Some(rle) = rle { - Level::read_rle(rle) + Level::read_rle(&rle) } else { Level::read(std::io::stdin().lock()) }