Fix build warnings

This commit is contained in:
Nicolas Luck
2023-07-12 11:38:53 +02:00
parent f324c9591d
commit f65675836c
2 changed files with 3 additions and 6 deletions

View File

@@ -316,8 +316,6 @@ impl Machine {
}
pub fn test_load_file(&mut self, file: &str) -> Vec<u8> {
use std::io::Read;
let stream = Stream::from_owned_string(
std::fs::read_to_string(AsRef::<std::path::Path>::as_ref(file)).unwrap(),
&mut self.machine_st.arena,

View File

@@ -1,9 +1,8 @@
use ordered_float::OrderedFloat;
use rug::*;
use std::{collections::BTreeMap};
use std::collections::BTreeMap;
use crate::atom_table::*;
use super::Machine;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum QueryResult {
@@ -120,7 +119,7 @@ impl TryFrom<String> for Value {
while let Some(value) = iter.next() {
let mut iter = value.split(":");
let key = iter.next().unwrap().to_string();
let _key = iter.next().unwrap().to_string();
let value = iter.next().unwrap().to_string();
values.push(Value::try_from(value)?);
@@ -135,7 +134,7 @@ impl TryFrom<String> for Value {
while let Some(value) = iter.next() {
let mut iter = value.split(":");
let key = iter.next().unwrap().to_string();
let _key = iter.next().unwrap().to_string();
let value = iter.next().unwrap().to_string();
values.push(Value::try_from(value)?);