Skip to content

Commit 48f2dfd

Browse files
committed
fix compile
Signed-off-by: xxchan <[email protected]>
1 parent 866a3ae commit 48f2dfd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

crates/iceberg/src/io/object_cache.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
use std::mem::size_of_val;
1819
use std::sync::Arc;
1920

2021
use crate::io::FileIO;

crates/iceberg/src/utils.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
use std::num::NonZero;
18+
use std::num::NonZeroUsize;
1919

2020
// Use a default value of 1 as the safest option.
2121
// See https://doc.rust-lang.org/std/thread/fn.available_parallelism.html#limitations
@@ -31,12 +31,12 @@ const DEFAULT_PARALLELISM: usize = 1;
3131
/// are circumstances where the level of available
3232
/// parallelism can change during the lifetime of an executing
3333
/// process, but this should not be called in a hot loop.
34-
pub(crate) fn available_parallelism() -> NonZero<usize> {
34+
pub(crate) fn available_parallelism() -> NonZeroUsize {
3535
std::thread::available_parallelism().unwrap_or_else(|_err| {
3636
// Failed to get the level of parallelism.
3737
// TODO: log/trace when this fallback occurs.
3838

3939
// Using a default value.
40-
NonZero::new(DEFAULT_PARALLELISM).unwrap()
40+
NonZeroUsize::new(DEFAULT_PARALLELISM).unwrap()
4141
})
4242
}

0 commit comments

Comments
 (0)