Skip to content

Commit 39e865d

Browse files
generatedunixname833006366474664meta-codesync[bot]
authored andcommitted
[AutoAccept][Codemod][RustModRsLayout] [codemod] rust: convert mod.rs to the 2018-edition layout in antlir (antlir)
Differential Revision: D113750590 fbshipit-source-id: 96aafa9e5997e14eecd8cb9ddd71533f99c7f1bb
1 parent a7e9bbd commit 39e865d

14 files changed

Lines changed: 47 additions & 1 deletion

File tree

File renamed without changes.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
2+
3+
use serde::Deserialize;
4+
use serde::Serialize;
5+
use uuid::Uuid;
6+
7+
use super::Fact;
8+
use super::Key;
9+
use crate::fact_impl;
10+
11+
/// Describe an fbpkg that was installed into the image at some point. We don't
12+
/// necessarily know *where* that was installed, just that it was (it could even
13+
/// have been removed!), but that doesn't matter for the purposes of just
14+
/// tracking what fbpkgs went into an image.
15+
/// This is serialized directly by the buck rules for fbpkg_install,
16+
/// fetch_fbpkg_mount, fbpkg_builder and chef_solo.
17+
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
18+
pub struct FbpkgInstall {
19+
name: String,
20+
tag: String,
21+
uuid: Uuid,
22+
}
23+
24+
#[fact_impl("antlir2_facts::fact::facebook::FbpkgInstall")]
25+
impl Fact for FbpkgInstall {
26+
fn key(&self) -> Key {
27+
// a given fbpkg name may be installed multiple times in an image, but
28+
// the name:tag combo will always have the same uuid, so just use
29+
// name:tag as the unique identifier that then tells us enough info
30+
// about what package was installed
31+
format!("{}:{}", self.name, self.tag).into()
32+
}
33+
}
34+
35+
impl FbpkgInstall {
36+
pub fn key(name: &str, tag: &str) -> Key {
37+
format!("{}:{}", name, tag).into()
38+
}
39+
}
File renamed without changes.

antlir/antlir2/antlir2_packager/src/sendstream/userspace/mod.rs renamed to antlir/antlir2/antlir2_packager/src/sendstream/userspace.rs

File renamed without changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
2+
3+
pub mod caf;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
2+
3+
mod manifold;
4+
pub(crate) use manifold::*;

antlir/antlir2/sendstream_parser/src/wire/mod.rs renamed to antlir/antlir2/sendstream_parser/src/wire.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ mod tests {
6262
#[tokio::test]
6363
async fn early_exit() {
6464
let make_parser = |truncate: Option<usize>| async move {
65-
let src = include_bytes!("../../testdata/demo.sendstream");
65+
let src = include_bytes!("wire/../../testdata/demo.sendstream");
6666
// only use simplex stream if we're going to truncate it
6767
// prematurely, otherwise use a Cursor on top of the static byte
6868
// slice so that the framed codec actually sees the EOF
File renamed without changes.

antlir/btrfs_send_stream_upgrade/src/mp/send_elements/mod.rs renamed to antlir/btrfs_send_stream_upgrade/src/mp/send_elements.rs

File renamed without changes.

0 commit comments

Comments
 (0)