From 0f4b3ece5f815a43de7f3830468cba237f96ace4 Mon Sep 17 00:00:00 2001 From: Jeong Yunwon Date: Mon, 18 Apr 2022 04:02:47 +0900 Subject: [PATCH] hide PyObjectPayload from crate root --- vm/src/function.rs | 5 ++--- vm/src/lib.rs | 3 +-- vm/src/protocol/buffer.rs | 5 +++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/vm/src/function.rs b/vm/src/function.rs index c24685bc9..a070047d4 100644 --- a/vm/src/function.rs +++ b/vm/src/function.rs @@ -5,9 +5,8 @@ mod number; use crate::{ builtins::{PyBaseExceptionRef, PyTupleRef, PyTypeRef}, - pyobject::PyThreadingConstraint, - AsPyObject, PyObject, PyObjectPayload, PyObjectRef, PyRef, PyResult, PyValue, TryFromObject, - VirtualMachine, + pyobject::{PyObjectPayload, PyThreadingConstraint}, + AsPyObject, PyObject, PyObjectRef, PyRef, PyResult, PyValue, TryFromObject, VirtualMachine, }; use indexmap::IndexMap; use itertools::Itertools; diff --git a/vm/src/lib.rs b/vm/src/lib.rs index 72f62139b..702cc1f00 100644 --- a/vm/src/lib.rs +++ b/vm/src/lib.rs @@ -89,8 +89,7 @@ mod pyobject { pub use self::convert::{TryFromBorrowedObject, TryFromObject}; // pyobject items pub use self::pyobject::{ - AsPyObject, PyContext, PyMethod, PyObjectPayload, PyObjectWrap, PyRefExact, PyResult, - PyStructSequence, PyValue, + AsPyObject, PyContext, PyMethod, PyObjectWrap, PyRefExact, PyResult, PyStructSequence, PyValue, }; // pyobjectrc items pub use self::pyobject::{PyObject, PyObjectRef, PyObjectView, PyObjectWeak, PyRef, PyWeakRef}; diff --git a/vm/src/protocol/buffer.rs b/vm/src/protocol/buffer.rs index a152f442f..00e6b410e 100644 --- a/vm/src/protocol/buffer.rs +++ b/vm/src/protocol/buffer.rs @@ -6,10 +6,11 @@ use crate::{ borrow::{BorrowedValue, BorrowedValueMut}, lock::{MapImmutable, PyMutex, PyMutexGuard}, }, + pyobject::PyObjectPayload, sliceable::wrap_index, types::{Constructor, Unconstructible}, - AsPyObject, PyObject, PyObjectPayload, PyObjectRef, PyObjectView, PyObjectWrap, PyRef, - PyResult, PyValue, TryFromBorrowedObject, VirtualMachine, + AsPyObject, PyObject, PyObjectRef, PyObjectView, PyObjectWrap, PyRef, PyResult, PyValue, + TryFromBorrowedObject, VirtualMachine, }; use itertools::Itertools; use std::{borrow::Cow, fmt::Debug, ops::Range};