Skip to content

rust: Rename BuildChunkedOCI struct to BuildChunkedOCIOpts #5273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/src/cli_experimental.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ enum Cmd {
enum ComposeCmd {
BuildChunkedOCI {
#[clap(flatten)]
opts: crate::compose::BuildChunkedOCI,
opts: crate::compose::BuildChunkedOCIOpts,
},
}

Expand Down
8 changes: 4 additions & 4 deletions rust/src/compose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl Default for InitializeMode {
}

#[derive(Debug, Parser)]
struct Opt {
struct ComposeImageOpts {
#[clap(long)]
#[clap(value_parser)]
/// Directory to use for caching downloaded packages and other data
Expand Down Expand Up @@ -156,7 +156,7 @@ struct Opt {

/// Generate a "chunked" OCI archive from an input rootfs.
#[derive(Debug, Parser)]
pub(crate) struct BuildChunkedOCI {
pub(crate) struct BuildChunkedOCIOpts {
/// Path to the source root filesystem tree.
#[clap(long, required_unless_present = "from")]
rootfs: Option<Utf8PathBuf>,
Expand Down Expand Up @@ -269,7 +269,7 @@ impl Drop for PodmanMount {
}
}

impl BuildChunkedOCI {
impl BuildChunkedOCIOpts {
pub(crate) fn run(self) -> Result<()> {
enum FileSource {
Rootfs(Utf8PathBuf),
Expand Down Expand Up @@ -546,7 +546,7 @@ pub(crate) fn compose_image(args: Vec<String>) -> CxxResult<()> {
use crate::isolation::self_command;
let cancellable = gio::Cancellable::NONE;

let opt = Opt::parse_from(args.iter().skip(1));
let opt = ComposeImageOpts::parse_from(args.iter().skip(1));

let tempdir = tempfile::tempdir()?;
let tempdir = Utf8Path::from_path(tempdir.path()).unwrap();
Expand Down