From c84c38544bc6e81f0b0482e4e82b6c95848c1a0c Mon Sep 17 00:00:00 2001 From: Akshay Date: Tue, 6 Apr 2021 14:54:54 +0530 Subject: apply clippy lints --- src/utils.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/utils.rs') diff --git a/src/utils.rs b/src/utils.rs index ab446f4..8c3b144 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -46,7 +46,7 @@ pub fn draw_text>( font.set_style(sdl2::ttf::FontStyle::NORMAL); font.set_hinting(sdl2::ttf::Hinting::Mono); let surface = font - .render(if text.is_empty() { " " } else { text.as_ref() }) + .render(if text.is_empty() { " " } else { text }) .blended(color) .unwrap(); let texture = texture_creator @@ -84,7 +84,7 @@ pub fn load_script>(path: P, app: &mut AppState) -> Result<(), Li .read_to_string(&mut buf) .map_err(EvalError::ScriptLoadError)?; - let mut parser = Parser::new(Lexer::new(&buf, 0)); + let mut parser = Parser::new(Lexer::new(&buf)); let mut evaluator = Evaluator { app, context: Vec::new(), @@ -94,7 +94,7 @@ pub fn load_script>(path: P, app: &mut AppState) -> Result<(), Li })? { evaluator.eval(&expr)?; } - return Ok(()); + Ok(()) } pub fn load_file>(path: P) -> Result { -- cgit v1.2.3