Skip to content

Commit

Permalink
chore: use into
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag committed Jul 7, 2023
1 parent 3501420 commit 1e4299a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/common/meta/src/rpc/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ impl From<PbRegion> for Region {
impl From<Region> for PbRegion {
fn from(region: Region) -> Self {
Self {
id: region.id.as_u64(),
id: region.id.into(),
name: region.name,
partition: region.partition.map(Into::into),
attrs: region.attrs,
Expand Down
2 changes: 1 addition & 1 deletion src/mito/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ impl<R: Region> Table for MitoTable<R> {
Ok(regions
.values()
.map(|region| RegionStat {
region_id: region.id().as_u64(),
region_id: region.id().into(),
disk_usage_bytes: region.disk_usage_bytes(),
})
.collect())
Expand Down
2 changes: 1 addition & 1 deletion src/storage/src/flush/picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub trait FlushItem {
#[async_trait]
impl<S: LogStore> FlushItem for RegionImpl<S> {
fn item_id(&self) -> u64 {
self.id().as_u64()
self.id().into()
}

fn last_flush_time(&self) -> i64 {
Expand Down
2 changes: 1 addition & 1 deletion src/storage/src/wal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl<S: LogStore> Clone for Wal<S> {

impl<S: LogStore> Wal<S> {
pub fn new(region_id: RegionId, store: Arc<S>) -> Self {
let namespace = store.namespace(region_id.as_u64());
let namespace = store.namespace(region_id.into());
Self {
region_id,
namespace,
Expand Down
2 changes: 1 addition & 1 deletion src/store-api/src/storage/region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub trait Region: Send + Sync + Clone + std::fmt::Debug + 'static {

fn region_stat(&self) -> RegionStat {
RegionStat {
region_id: self.id().as_u64(),
region_id: self.id().into(),
disk_usage_bytes: self.disk_usage_bytes(),
}
}
Expand Down

0 comments on commit 1e4299a

Please sign in to comment.