chore(tvix): fix trivial clippy lints
Relates to b/321. Change-Id: I37284f89b186e469eb432e2bbedb37aa125a6ad4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9961 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
67999f0dcf
commit
b3b1f649d6
14 changed files with 35 additions and 36 deletions
|
|
@ -81,7 +81,7 @@ fn parse_module_args(args: TokenStream) -> Option<Type> {
|
|||
_ => panic!("arguments to `builtins`-attribute must be of the form `name = value`"),
|
||||
};
|
||||
|
||||
if name_value.path.get_ident().unwrap().to_string() != "state" {
|
||||
if *name_value.path.get_ident().unwrap() != "state" {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ pub fn builtins(args: TokenStream, item: TokenStream) -> TokenStream {
|
|||
let mut captures_state = false;
|
||||
if let FnArg::Typed(PatType { pat, .. }) = &f.sig.inputs[0] {
|
||||
if let Pat::Ident(PatIdent { ident, .. }) = pat.as_ref() {
|
||||
if ident.to_string() == "state" {
|
||||
if *ident == "state" {
|
||||
if state_type.is_none() {
|
||||
panic!("builtin captures a `state` argument, but no state type was defined");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue