Get rid of file-wide allow(dead_code) in object
Also, squash most of the warnings that came up as a result of this. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -1,8 +1,3 @@
|
||||
// TODO - remove this at some point.
|
||||
// I haven't gotten around to testing or working with this API yet and I don't
|
||||
// want it to clog the warnings yet.
|
||||
#![allow(dead_code)]
|
||||
|
||||
use crate::syn::ast::SpStmt;
|
||||
use crate::vm::{error::*, machine::Machine};
|
||||
use crate::{scope::Scope, syn::span::Span, vm::inst::SpInst};
|
||||
@@ -43,10 +38,6 @@ pub struct QuoteTable {
|
||||
}
|
||||
|
||||
impl QuoteTable {
|
||||
pub fn new() -> Self {
|
||||
Default::default()
|
||||
}
|
||||
|
||||
pub fn insert(
|
||||
&mut self,
|
||||
span: Span,
|
||||
@@ -122,7 +113,8 @@ impl Debug for BuiltinFn {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(
|
||||
fmt,
|
||||
"builtin function at {:#x}",
|
||||
"builtin function {} at {:#x}",
|
||||
self.name,
|
||||
(&self.fun as *const _ as usize)
|
||||
)
|
||||
}
|
||||
@@ -216,6 +208,7 @@ impl FloatObj {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn value(&self) -> Float {
|
||||
self.value
|
||||
}
|
||||
@@ -253,6 +246,7 @@ impl IntObj {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn value(&self) -> Int {
|
||||
self.value
|
||||
}
|
||||
@@ -302,6 +296,7 @@ impl StrObj {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn value(&self) -> &String {
|
||||
&self.value
|
||||
}
|
||||
@@ -339,6 +334,7 @@ impl QuoteObj {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn value(&self) -> Quote {
|
||||
self.value
|
||||
}
|
||||
@@ -377,6 +373,7 @@ impl BuiltinFnObj {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn value(&self) -> &BuiltinFn {
|
||||
&self.value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user