Remove now-retired Float references

This commit is contained in:
Tony Garnock-Jones 2024-02-03 15:24:28 +01:00
parent 0514f11d0f
commit 0f2d9239f9
6 changed files with 3 additions and 14 deletions

View File

@ -27,6 +27,7 @@ use pat::lit;
enum SymbolVariant<'a> {
Normal(&'a str),
#[allow(dead_code)] // otherwise we get 'warning: field `0` is never read'
Binder(&'a str),
Substitution(&'a str),
Discard,
@ -79,10 +80,6 @@ impl ValueCompiler {
match v.value() {
Value::Boolean(b) =>
quote!(#V_::Value::from(#b).wrap()),
Value::Float(f) => {
let f = f.0;
quote!(#V_::Value::from(#f).wrap())
}
Value::Double(d) => {
let d = d.0;
quote!(#V_::Value::from(#d).wrap())

View File

@ -15,7 +15,6 @@ use syn::parse::Parser;
use syn::parse::ParseStream;
use syn::parse_str;
use syndicate::value::Float;
use syndicate::value::Double;
use syndicate::value::IOValue;
use syndicate::value::NestedValue;
@ -266,7 +265,7 @@ fn parse1(c: Cursor) -> Result<(Stx, Cursor)> {
IOValue::new(i.base10_parse::<i128>()?)
}
Lit::Float(f) => if f.suffix() == "f32" {
IOValue::new(&Float(f.base10_parse::<f32>()?))
IOValue::new(&Double(f.base10_parse::<f32>()? as f64))
} else {
IOValue::new(&Double(f.base10_parse::<f64>()?))
}

View File

@ -50,10 +50,6 @@ pub fn value_to_value_expr(v: &IOValue) -> TokenStream2 {
match v.value() {
Value::Boolean(b) =>
quote!(#V_::Value::from(#b).wrap()),
Value::Float(f) => {
let f = f.0;
quote!(#V_::Value::from(#f).wrap())
}
Value::Double(d) => {
let d = d.0;
quote!(#V_::Value::from(#d).wrap())

View File

@ -261,7 +261,6 @@ impl<'env> PatternInstantiator<'env> {
fn instantiate_pattern(&mut self, template: &AnyValue) -> io::Result<P::Pattern> {
Ok(match template.value() {
Value::Boolean(_) |
Value::Float(_) |
Value::Double(_) |
Value::SignedInteger(_) |
Value::String(_) |
@ -372,7 +371,6 @@ impl Env {
fn instantiate_value(&self, template: &AnyValue) -> io::Result<AnyValue> {
Ok(match template.value() {
Value::Boolean(_) |
Value::Float(_) |
Value::Double(_) |
Value::SignedInteger(_) |
Value::String(_) |
@ -605,7 +603,6 @@ impl Env {
Ok(match template.value() {
Value::Boolean(_) |
Value::Float(_) |
Value::Double(_) |
Value::SignedInteger(_) |
Value::String(_) |

View File

@ -1991,6 +1991,7 @@ impl Facet {
}
#[derive(Debug, Clone)]
#[allow(dead_code)] // otherwise we get 'warning: field `0` is never read'
pub struct KeepAlive(Option<Arc<Mailbox>>);
impl ActorRef {

View File

@ -121,7 +121,6 @@ impl Pattern {
Pattern::PDiscard(_) => true,
Pattern::PAtom(b) => match &**b {
PAtom::Boolean => a.value().is_boolean(),
PAtom::Float => a.value().is_float(),
PAtom::Double => a.value().is_double(),
PAtom::SignedInteger => a.value().is_signedinteger(),
PAtom::String => a.value().is_string(),