Skip to content

Commit

Permalink
fix(value): remove unused code (#850)
Browse files Browse the repository at this point in the history
* fix(value): remove unused code

It breaks compilation.
  • Loading branch information
monoid authored Jul 22, 2024
1 parent b684ca0 commit 58a5f30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
17 changes: 0 additions & 17 deletions crates/air-lib/interpreter-value/src/value/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
*/

use super::JValue;
use core::fmt::{self, Display};
use core::ops;
use std::string::String;

Expand Down Expand Up @@ -113,22 +112,6 @@ mod private {
impl<'a, T> Sealed for &'a T where T: ?Sized + Sealed {}
}

/// Used in panic messages.
struct Type<'a>(&'a JValue);

impl<'a> Display for Type<'a> {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
match *self.0 {
JValue::Null => formatter.write_str("null"),
JValue::Bool(_) => formatter.write_str("boolean"),
JValue::Number(_) => formatter.write_str("number"),
JValue::String(_) => formatter.write_str("string"),
JValue::Array(_) => formatter.write_str("array"),
JValue::Object(_) => formatter.write_str("object"),
}
}
}

// The usual semantics of Index is to panic on invalid indexing.
//
// That said, the usual semantics are for things like Vec and BTreeMap which
Expand Down
2 changes: 2 additions & 0 deletions tools/cli/air/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
unused_unsafe,
unreachable_patterns
)]
// risc0 feature flag is commented out, but the code remains for future experiments
#![allow(unexpected_cfgs)]

mod beautify;
mod data;
Expand Down

0 comments on commit 58a5f30

Please sign in to comment.