diff --git a/common/src/encodings.rs b/common/src/encodings.rs index 402e0db77..7d99646c3 100644 --- a/common/src/encodings.rs +++ b/common/src/encodings.rs @@ -230,7 +230,6 @@ pub mod utf8 { } pub mod latin_1 { - use super::*; pub const ENCODING_NAME: &str = "latin-1"; diff --git a/common/src/wtf8/mod.rs b/common/src/wtf8/mod.rs index 4125a9bf7..f209b98a3 100644 --- a/common/src/wtf8/mod.rs +++ b/common/src/wtf8/mod.rs @@ -23,7 +23,7 @@ //! needing any copies or re-encoding. //! //! This implementation is mostly copied from the WTF-8 implentation in the -//! Rust standard library, which is used as the backing for [`OsStr`] on +//! Rust 1.85 standard library, which is used as the backing for [`OsStr`] on //! Windows targets. As previously mentioned, however, it is modified to not //! join two surrogates into one codepoint when concatenating strings, in order //! to match CPython's behavior. diff --git a/vm/src/anystr.rs b/vm/src/anystr.rs index 0a884fc73..89e747344 100644 --- a/vm/src/anystr.rs +++ b/vm/src/anystr.rs @@ -403,9 +403,7 @@ pub trait AnyStr { // Unified form of CPython functions: // _Py_bytes_islower - // Py_bytes_isupper // unicode_islower_impl - // unicode_isupper_impl fn py_islower(&self) -> bool { let mut lower = false; for c in self.elements() { @@ -418,6 +416,9 @@ pub trait AnyStr { lower } + // Unified form of CPython functions: + // Py_bytes_isupper + // unicode_isupper_impl fn py_isupper(&self) -> bool { let mut upper = false; for c in self.elements() { diff --git a/vm/sre_engine/Cargo.toml b/vm/sre_engine/Cargo.toml index 55ce24990..b34b01a0e 100644 --- a/vm/sre_engine/Cargo.toml +++ b/vm/sre_engine/Cargo.toml @@ -14,12 +14,8 @@ license.workspace = true name = "benches" harness = false -[features] -default = ["wtf8"] -wtf8 = ["rustpython-common"] - [dependencies] -rustpython-common = { workspace = true, optional = true } +rustpython-common = { workspace = true } num_enum = { workspace = true } bitflags = { workspace = true } optional = "0.5" diff --git a/vm/sre_engine/src/string.rs b/vm/sre_engine/src/string.rs index 551b1ca5e..20cacbfbe 100644 --- a/vm/sre_engine/src/string.rs +++ b/vm/sre_engine/src/string.rs @@ -1,4 +1,3 @@ -#[cfg(feature = "wtf8")] use rustpython_common::wtf8::Wtf8; #[derive(Debug, Clone, Copy)] @@ -151,7 +150,6 @@ impl StrDrive for &str { } } -#[cfg(feature = "wtf8")] impl StrDrive for &Wtf8 { #[inline] fn count(&self) -> usize {