Skip to content

Commit c07d3f0

Browse files
committed
obj::pystr -> pystr
1 parent 84b5475 commit c07d3f0

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

vm/src/bytesinner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ use crate::obj::objnone::PyNoneRef;
1414
use crate::obj::objsequence::{PySliceableSequence, SequenceIndex};
1515
use crate::obj::objslice::PySliceRef;
1616
use crate::obj::objstr::{self, PyString, PyStringRef};
17-
use crate::obj::pystr::{self, PyCommonString, PyCommonStringContainer, PyCommonStringWrapper};
1817
use crate::pyobject::{
1918
Either, PyComparisonValue, PyIterable, PyObjectRef, PyResult, TryFromObject, TypeProtocol,
2019
};
20+
use crate::pystr::{self, PyCommonString, PyCommonStringContainer, PyCommonStringWrapper};
2121
use crate::vm::VirtualMachine;
2222
use rustpython_common::hash;
2323

2424
#[derive(Debug, Default, Clone)]
2525
pub struct PyBytesInner {
26-
pub elements: Vec<u8>,
26+
pub(crate) elements: Vec<u8>,
2727
}
2828

2929
impl From<Vec<u8>> for PyBytesInner {

vm/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ pub mod import;
7070
pub mod obj;
7171
pub mod py_serde;
7272
pub mod pyobject;
73+
mod pystr;
7374
pub mod readline;
7475
pub mod scope;
7576
mod sequence;

vm/src/obj/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ pub mod objtype;
4343
pub mod objweakproxy;
4444
pub mod objweakref;
4545
pub mod objzip;
46-
pub(super) mod pystr;

vm/src/obj/objbytearray.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//! Implementation of the python bytearray object.
2-
use crate::common::cell::{PyRwLock, PyRwLockReadGuard, PyRwLockWriteGuard};
32
use bstr::ByteSlice;
43
use crossbeam_utils::atomic::AtomicCell;
54
use num_traits::cast::ToPrimitive;
@@ -10,16 +9,17 @@ use super::objiter;
109
use super::objsequence::SequenceIndex;
1110
use super::objstr::{PyString, PyStringRef};
1211
use super::objtype::PyClassRef;
13-
use super::pystr::{self, PyCommonString};
1412
use crate::bytesinner::{
1513
ByteInnerFindOptions, ByteInnerNewOptions, ByteInnerPaddingOptions, ByteInnerSplitOptions,
1614
ByteInnerTranslateOptions, ByteOr, PyBytesInner,
1715
};
16+
use crate::common::cell::{PyRwLock, PyRwLockReadGuard, PyRwLockWriteGuard};
1817
use crate::function::{OptionalArg, OptionalOption};
1918
use crate::pyobject::{
2019
Either, PyClassImpl, PyComparisonValue, PyContext, PyIterable, PyObjectRef, PyRef, PyResult,
2120
PyValue, TryFromObject, TypeProtocol,
2221
};
22+
use crate::pystr::{self, PyCommonString};
2323
use crate::vm::VirtualMachine;
2424

2525
/// "bytearray(iterable_of_ints) -> bytearray\n\

vm/src/obj/objbytes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use super::objiter;
88
use super::objsequence::SequenceIndex;
99
use super::objstr::{PyString, PyStringRef};
1010
use super::objtype::PyClassRef;
11-
use super::pystr::{self, PyCommonString};
1211
use crate::bytesinner::{
1312
ByteInnerFindOptions, ByteInnerNewOptions, ByteInnerPaddingOptions, ByteInnerSplitOptions,
1413
ByteInnerTranslateOptions, PyBytesInner,
@@ -20,6 +19,7 @@ use crate::pyobject::{
2019
PyClassImpl, PyComparisonValue, PyContext, PyIterable, PyObjectRef, PyRef, PyResult, PyValue,
2120
TryFromObject, TypeProtocol,
2221
};
22+
use crate::pystr::{self, PyCommonString};
2323
use crate::vm::VirtualMachine;
2424
use rustpython_common::hash::PyHash;
2525

vm/src/obj/objstr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ use super::objiter;
1919
use super::objnone::PyNone;
2020
use super::objsequence::{PySliceableSequence, SequenceIndex};
2121
use super::objtype::{self, PyClassRef};
22-
use super::pystr::{
23-
self, adjust_indices, PyCommonString, PyCommonStringContainer, PyCommonStringWrapper,
24-
};
2522
use crate::format::{FormatParseError, FormatSpec, FormatString, FromTemplate};
2623
use crate::function::{OptionalArg, OptionalOption, PyFuncArgs};
2724
use crate::pyobject::{
2825
IdProtocol, IntoPyObject, ItemProtocol, PyClassImpl, PyContext, PyIterable, PyObjectRef, PyRef,
2926
PyResult, PyValue, TryFromObject, TryIntoRef, TypeProtocol,
3027
};
28+
use crate::pystr::{
29+
self, adjust_indices, PyCommonString, PyCommonStringContainer, PyCommonStringWrapper,
30+
};
3131
use crate::vm::VirtualMachine;
3232
use rustpython_common::hash;
3333

File renamed without changes.

0 commit comments

Comments
 (0)