fix(value): remove unused code (#850)

* fix(value): remove unused code

It breaks compilation.
This commit is contained in:
Ivan Boldyrev 2024-07-22 18:53:16 +02:00 committed by GitHub
parent b684ca0b82
commit 58a5f3046a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 17 deletions

View File

@ -48,7 +48,6 @@
*/
use super::JValue;
use core::fmt::{self, Display};
use core::ops;
use std::string::String;
@ -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

View File

@ -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;