Skip to content

Commit

Permalink
[starlark] Rename Error::new -> new_kind
Browse files Browse the repository at this point in the history
Summary: To free the `new` name for "default" constructor. That should be `ErrorKind::Other` or `ErrorKind::Native`?

Test Plan: CI

Reviewed By: JakobDegen

Differential Revision: D63304734

fbshipit-source-id: 55c49781a8b05f18824ff8952bb5ebe8e851497b
  • Loading branch information
stepancheg authored and facebook-github-bot committed Sep 26, 2024
1 parent ef3ad54 commit da57d15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions antlir/bzl/shape2/bzl2ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ impl<'v> StarlarkValue<'v> for TypeId {
args.no_named_args()?;
args.positional1(eval.heap())
}
_ => Err(starlark::Error::new(starlark::ErrorKind::Other(anyhow!(
_ => Err(starlark::Error::new_other(anyhow!(
"only structs and enums are callable, not ({ty:#?})"
)))),
))),
}
}
}
Expand Down

0 comments on commit da57d15

Please sign in to comment.