Loading tools/aconfig/src/codegen_rust.rs +2 −2 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ pub const fn r#test_disabled_ro() -> bool { #[inline(always)] pub fn r#test_disabled_rw() -> bool { profcollect_libflags_rust::GetServerConfigurableFlag("test", "disabled_rw", "false") == "true" flags_rust::GetServerConfigurableFlag("test", "disabled_rw", "false") == "true" } #[inline(always)] Loading @@ -121,7 +121,7 @@ pub const fn r#test_enabled_ro() -> bool { #[inline(always)] pub fn r#test_enabled_rw() -> bool { profcollect_libflags_rust::GetServerConfigurableFlag("test", "enabled_rw", "false") == "true" flags_rust::GetServerConfigurableFlag("test", "enabled_rw", "false") == "true" } "#; assert_eq!(expected.trim(), String::from_utf8(generated.contents).unwrap().trim()); Loading tools/aconfig/templates/rust.template +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ pub const fn r#{parsed_flag.fn_name}() -> bool \{ {{- if parsed_flag.is_read_write -}} #[inline(always)] pub fn r#{parsed_flag.fn_name}() -> bool \{ profcollect_libflags_rust::GetServerConfigurableFlag("{namespace}", "{parsed_flag.name}", "false") == "true" flags_rust::GetServerConfigurableFlag("{namespace}", "{parsed_flag.name}", "false") == "true" } {{ endif -}} Loading Loading
tools/aconfig/src/codegen_rust.rs +2 −2 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ pub const fn r#test_disabled_ro() -> bool { #[inline(always)] pub fn r#test_disabled_rw() -> bool { profcollect_libflags_rust::GetServerConfigurableFlag("test", "disabled_rw", "false") == "true" flags_rust::GetServerConfigurableFlag("test", "disabled_rw", "false") == "true" } #[inline(always)] Loading @@ -121,7 +121,7 @@ pub const fn r#test_enabled_ro() -> bool { #[inline(always)] pub fn r#test_enabled_rw() -> bool { profcollect_libflags_rust::GetServerConfigurableFlag("test", "enabled_rw", "false") == "true" flags_rust::GetServerConfigurableFlag("test", "enabled_rw", "false") == "true" } "#; assert_eq!(expected.trim(), String::from_utf8(generated.contents).unwrap().trim()); Loading
tools/aconfig/templates/rust.template +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ pub const fn r#{parsed_flag.fn_name}() -> bool \{ {{- if parsed_flag.is_read_write -}} #[inline(always)] pub fn r#{parsed_flag.fn_name}() -> bool \{ profcollect_libflags_rust::GetServerConfigurableFlag("{namespace}", "{parsed_flag.name}", "false") == "true" flags_rust::GetServerConfigurableFlag("{namespace}", "{parsed_flag.name}", "false") == "true" } {{ endif -}} Loading