Skip to content

Commit

Permalink
make from_protobuf and to_protobuf private
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Chien <[email protected]>
  • Loading branch information
stdrc committed Jan 9, 2024
1 parent 55a611a commit 2e3ec9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/common/src/util/sort_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ pub enum Direction {
}

impl Direction {
pub fn from_protobuf(direction: &PbDirection) -> Self {
fn from_protobuf(direction: &PbDirection) -> Self {
match direction {
PbDirection::Ascending => Self::Ascending,
PbDirection::Descending => Self::Descending,
PbDirection::Unspecified => unreachable!(),
}
}

pub fn to_protobuf(self) -> PbDirection {
fn to_protobuf(self) -> PbDirection {
match self {
Self::Ascending => PbDirection::Ascending,
Self::Descending => PbDirection::Descending,
Expand Down Expand Up @@ -74,15 +74,15 @@ enum NullsAre {
}

impl NullsAre {
pub fn from_protobuf(nulls_are: &PbNullsAre) -> Self {
fn from_protobuf(nulls_are: &PbNullsAre) -> Self {
match nulls_are {
PbNullsAre::Largest => Self::Largest,
PbNullsAre::Smallest => Self::Smallest,
PbNullsAre::Unspecified => unreachable!(),
}
}

pub fn to_protobuf(self) -> PbNullsAre {
fn to_protobuf(self) -> PbNullsAre {
match self {
Self::Largest => PbNullsAre::Largest,
Self::Smallest => PbNullsAre::Smallest,
Expand Down

0 comments on commit 2e3ec9a

Please sign in to comment.