Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(value): remove unused code #850

Merged
merged 5 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading