chore(nar-bridge): upgrade to 2024 edition

Part of #114
This edition change doesn't affect this crate except for formatting.

Change-Id: Ia7adca8a62e3cb7cbc1187c539907be45a05ab4b
Reviewed-on: https://cl.snix.dev/c/snix/+/30589
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
This commit is contained in:
Starnick4444 2025-06-30 21:17:51 +02:00 committed by clbot
parent 33cd666f5c
commit e9073eeddd
6 changed files with 16 additions and 12 deletions

View file

@ -7791,7 +7791,7 @@ rec {
"nar-bridge" = rec {
crateName = "nar-bridge";
version = "0.1.0";
edition = "2021";
edition = "2024";
crateBin = [
{
name = "nar-bridge";

View file

@ -1,7 +1,7 @@
[package]
name = "nar-bridge"
version = "0.1.0"
edition = "2021"
edition = "2024"
[dependencies]
axum = { workspace = true, features = ["http2"] }

View file

@ -0,0 +1,2 @@
# FUTUREWORK: move to .. once all crates are migrated (#114)
edition = "2024"

View file

@ -1,13 +1,13 @@
use axum::http::StatusCode;
use axum::response::IntoResponse;
use axum::routing::{head, put};
use axum::{routing::get, Router};
use axum::{Router, routing::get};
use lru::LruCache;
use nix_compat::nix_http;
use parking_lot::RwLock;
use snix_castore::Node;
use snix_castore::blobservice::BlobService;
use snix_castore::directoryservice::DirectoryService;
use snix_castore::Node;
use snix_store::pathinfoservice::PathInfoService;
use std::num::NonZeroUsize;
use std::sync::Arc;

View file

@ -1,7 +1,7 @@
use axum::extract::Query;
use axum::http::{Response, StatusCode};
use axum::{body::Body, response::IntoResponse};
use axum_extra::{headers::Range, TypedHeader};
use axum_extra::{TypedHeader, headers::Range};
use axum_range::{KnownSize, Ranged};
use bytes::Bytes;
use data_encoding::BASE64URL_NOPAD;
@ -11,7 +11,7 @@ use serde::Deserialize;
use snix_store::nar::ingest_nar_and_hash;
use std::io;
use tokio_util::io::ReaderStream;
use tracing::{instrument, warn, Span};
use tracing::{Span, instrument, warn};
use crate::AppState;
@ -220,7 +220,7 @@ mod tests {
sync::{Arc, LazyLock},
};
use axum::{http::Method, Router};
use axum::{Router, http::Method};
use bytes::Bytes;
use data_encoding::BASE64URL_NOPAD;
use nix_compat::nixbase32;
@ -407,10 +407,12 @@ mod tests {
.expect_success()
.await;
assert!(blob_service
.has(&HELLOWORLD_BLOB_DIGEST)
.await
.expect("blobservice"))
assert!(
blob_service
.has(&HELLOWORLD_BLOB_DIGEST)
.await
.expect("blobservice")
)
}
// Upload a NAR with blobs and directories, ensure blobs and directories

View file

@ -6,7 +6,7 @@ use nix_compat::{
store_path::StorePath,
};
use snix_store::pathinfoservice::PathInfo;
use tracing::{instrument, warn, Span};
use tracing::{Span, instrument, warn};
use crate::AppState;