Skip to content

Commit 2cf190f

Browse files
committed
fix!: Replace Dag with TodoList, a rebase term
1 parent 6ee54ad commit 2cf190f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use assert_cmd::output::OutputOkExt;
66
use bstr::ByteSlice;
77
use eyre::WrapErr;
88

9-
impl Dag {
9+
impl TodoList {
1010
pub fn load(path: &std::path::Path) -> eyre::Result<Self> {
1111
let data = std::fs::read_to_string(path)
1212
.wrap_err_with(|| format!("Could not read {}", path.display()))?;

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ fn run() -> proc_exit::ExitResult {
3333

3434
if let Some(input) = args.input.as_deref() {
3535
std::fs::create_dir_all(&output)?;
36-
let mut dag = git_fixture::Dag::load(input).with_code(proc_exit::Code::CONFIG_ERR)?;
36+
let mut dag = git_fixture::TodoList::load(input).with_code(proc_exit::Code::CONFIG_ERR)?;
3737
dag.sleep = dag.sleep.or_else(|| args.sleep.map(|s| s.into()));
3838
dag.run(&output).with_code(proc_exit::Code::FAILURE)?;
3939
} else if let Some(schema_path) = args.schema.as_deref() {
40-
let schema = schemars::schema_for!(git_fixture::Dag);
40+
let schema = schemars::schema_for!(git_fixture::TodoList);
4141
let schema = serde_json::to_string_pretty(&schema).unwrap();
4242
if schema_path == std::path::Path::new("-") {
4343
std::io::stdout().write_all(schema.as_bytes())?;

src/model.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, schemars::JsonSchema)]
22
#[serde(rename_all = "snake_case")]
33
#[serde(deny_unknown_fields)]
4-
pub struct Dag {
4+
pub struct TodoList {
55
#[serde(default = "init_default")]
66
pub init: bool,
77
#[serde(default)]
@@ -18,7 +18,7 @@ fn init_default() -> bool {
1818
true
1919
}
2020

21-
impl Default for Dag {
21+
impl Default for TodoList {
2222
fn default() -> Self {
2323
Self {
2424
init: init_default(),

tests/fixtures.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
fn assert_success(name: &str) {
33
let path = std::path::PathBuf::from(format!("tests/fixtures/{name}.yml"));
44

5-
let dag = git_fixture::Dag::load(&path).unwrap();
5+
let dag = git_fixture::TodoList::load(&path).unwrap();
66

77
let tmpdir = std::path::Path::new(std::env!("CARGO_TARGET_TMPDIR"));
88
let sandbox = tmpdir.join("test").join("case").join(name);

0 commit comments

Comments
 (0)