refactor(tvix/castore/bin/tvix-store) don't import std::io

Make it more clear this is not tokio::io.

Change-Id: Ic2fa56f0baf1c200b6631098d556388a19629a45
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10452
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
This commit is contained in:
Florian Klink 2023-12-28 13:36:21 +01:00 committed by clbot
parent 46a372d5d7
commit 22427dc8d0

View file

@ -3,7 +3,6 @@ use data_encoding::BASE64;
use futures::future::try_join_all; use futures::future::try_join_all;
use nix_compat::store_path; use nix_compat::store_path;
use nix_compat::store_path::StorePath; use nix_compat::store_path::StorePath;
use std::io;
use std::path::Path; use std::path::Path;
use std::path::PathBuf; use std::path::PathBuf;
use std::sync::Arc; use std::sync::Arc;
@ -169,7 +168,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.with(if cli.json { .with(if cli.json {
Some( Some(
tracing_subscriber::fmt::Layer::new() tracing_subscriber::fmt::Layer::new()
.with_writer(io::stderr.with_max_level(level)) .with_writer(std::io::stderr.with_max_level(level))
.json(), .json(),
) )
} else { } else {
@ -178,7 +177,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.with(if !cli.json { .with(if !cli.json {
Some( Some(
tracing_subscriber::fmt::Layer::new() tracing_subscriber::fmt::Layer::new()
.with_writer(io::stderr.with_max_level(level)) .with_writer(std::io::stderr.with_max_level(level))
.pretty(), .pretty(),
) )
} else { } else {
@ -265,7 +264,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let tasks = paths let tasks = paths
.into_iter() .into_iter()
.map(|path| { .map(|path| {
let task: JoinHandle<io::Result<()>> = tokio::task::spawn({ let task: JoinHandle<std::io::Result<()>> = tokio::task::spawn({
let blob_service = blob_service.clone(); let blob_service = blob_service.clone();
let directory_service = directory_service.clone(); let directory_service = directory_service.clone();
let path_info_service = path_info_service.clone(); let path_info_service = path_info_service.clone();
@ -384,7 +383,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
info!("interrupt received, unmounting…"); info!("interrupt received, unmounting…");
tokio::task::spawn_blocking(move || fuse_daemon.unmount()).await??; tokio::task::spawn_blocking(move || fuse_daemon.unmount()).await??;
info!("unmount occured, terminating…"); info!("unmount occured, terminating…");
Ok::<_, io::Error>(()) Ok::<_, std::io::Error>(())
}) })
.await??; .await??;
} }