summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2018-04-11 10:15:10 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2018-04-11 10:15:10 +0100
commit3e76b0783dc003bca94706c7e2933ade7f9191e2 (patch)
tree3b4568daf06cc8cd282f9578266a7ea96e61eb19
parentb6f881ed668dd80c607fbb893e6f1b4f2f782f2a (diff)
downloadcanopied-3e76b0783dc003bca94706c7e2933ade7f9191e2.tar.bz2
Change some bits to remove warnings
-rw-r--r--src/definitions.rs5
-rw-r--r--src/main.rs2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/definitions.rs b/src/definitions.rs
index 20afe38..f4eb74e 100644
--- a/src/definitions.rs
+++ b/src/definitions.rs
@@ -99,6 +99,7 @@ impl RawECUEntry {
}
pub fn decode(&self, payload: &[u8]) -> Option<Vec<NamedValue>> {
+ trace!("Decoding for {} ({})", self.name(), self.description());
let mut ret = Vec::new();
if payload.len() != self.response.length {
@@ -159,7 +160,7 @@ impl RawECUEntry {
}
};
let name = {
- let mut n = self.name.clone();
+ let mut n = self.name().to_owned();
n.push('.');
n.push_str(&entry.name);
n
@@ -171,7 +172,7 @@ impl RawECUEntry {
for i in 0..payload.len() {
if !used_locations.contains(&i) {
let name = {
- let mut n = self.name.clone();
+ let mut n = self.name().to_owned();
n.push_str(&format!(".unused_{}", i));
n
};
diff --git a/src/main.rs b/src/main.rs
index 43198e1..e4f2e7e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -115,7 +115,7 @@ fn main() {
Entry::Occupied(o) => if value != *o.get() {
info!("{} changed {:?} -> {:?}", name, o.get(), value);
},
- Entry::Vacant(v) => {
+ Entry::Vacant(_) => {
info!("{} changed None -> {:?}", name, value);
}
};