Skip to content

Commit

Permalink
refactor(python): Make NodeTraverser struct public (pola-rs#18822)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego authored Sep 20, 2024
1 parent 506f927 commit b7e5e09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/polars-python/src/lazyframe/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl From<&ExprIR> for PyExprIR {
type Version = (u16, u16);

#[pyclass]
pub(crate) struct NodeTraverser {
pub struct NodeTraverser {
root: Node,
lp_arena: Arc<Mutex<Arena<IR>>>,
expr_arena: Arc<Mutex<Arena<AExpr>>>,
Expand All @@ -59,7 +59,7 @@ impl NodeTraverser {
// changes (e.g. exposing a new expression node).
const VERSION: Version = (2, 0);

pub(crate) fn new(root: Node, lp_arena: Arena<IR>, expr_arena: Arena<AExpr>) -> Self {
pub fn new(root: Node, lp_arena: Arena<IR>, expr_arena: Arena<AExpr>) -> Self {
Self {
root,
lp_arena: Arc::new(Mutex::new(lp_arena)),
Expand All @@ -71,7 +71,7 @@ impl NodeTraverser {
}

#[allow(clippy::type_complexity)]
pub(crate) fn get_arenas(&self) -> (Arc<Mutex<Arena<IR>>>, Arc<Mutex<Arena<AExpr>>>) {
pub fn get_arenas(&self) -> (Arc<Mutex<Arena<IR>>>, Arc<Mutex<Arena<AExpr>>>) {
(self.lp_arena.clone(), self.expr_arena.clone())
}

Expand Down

0 comments on commit b7e5e09

Please sign in to comment.