1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-03 11:52:26 +01:00

Applied linter fixes

This commit is contained in:
Daniele Esposti
2019-03-08 10:46:49 +00:00
committed by David Peter
parent a21ae614e6
commit 82f14121bd
12 changed files with 37 additions and 44 deletions

View File

@@ -1,14 +1,15 @@
use std::borrow::Cow;
use std::collections::HashMap;
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Default)]
pub struct SyntaxMapping(HashMap<String, String>);
impl SyntaxMapping {
pub fn new() -> SyntaxMapping {
SyntaxMapping(HashMap::new())
Default::default()
}
pub fn insert(&mut self, from: impl Into<String>, to: impl Into<String>) -> Option<String> {
self.0.insert(from.into(), to.into())
}