Loading tools/aconfig/aconfig/src/codegen/rust.rs +3 −3 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ mod tests { const PROD_EXPECTED: &str = r#" //! codegenerated rust flag lib use aconfig_storage_read_api::{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; // use aconfig_storage_read_api::{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; use std::path::Path; use std::io::Write; use log::{log, LevelFilter, Level}; Loading Loading @@ -510,7 +510,7 @@ pub fn reset_flags() { const EXPORTED_EXPECTED: &str = r#" //! codegenerated rust flag lib use aconfig_storage_read_api::{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; // use aconfig_storage_read_api::{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; use std::path::Path; use std::io::Write; use log::{log, LevelFilter, Level}; Loading Loading @@ -584,7 +584,7 @@ pub fn enabled_ro_exported() -> bool { const FORCE_READ_ONLY_EXPECTED: &str = r#" //! codegenerated rust flag lib use aconfig_storage_read_api::{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; // use aconfig_storage_read_api::{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; use std::path::Path; use std::io::Write; use log::{log, LevelFilter, Level}; Loading tools/aconfig/aconfig/templates/rust.template +4 −1 Original line number Diff line number Diff line //! codegenerated rust flag lib use aconfig_storage_read_api::\{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; // use aconfig_storage_read_api::\{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; use std::path::Path; use std::io::Write; use log::\{log, LevelFilter, Level}; Loading Loading @@ -61,6 +61,7 @@ pub fn {flag.name}() -> bool \{ return result; } /* // This will be called multiple times. Subsequent calls after the first // are noops. logger::init( Loading Loading @@ -111,6 +112,8 @@ pub fn {flag.name}() -> bool \{ } } */ result {{ endif }} {{ -endif }} Loading Loading
tools/aconfig/aconfig/src/codegen/rust.rs +3 −3 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ mod tests { const PROD_EXPECTED: &str = r#" //! codegenerated rust flag lib use aconfig_storage_read_api::{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; // use aconfig_storage_read_api::{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; use std::path::Path; use std::io::Write; use log::{log, LevelFilter, Level}; Loading Loading @@ -510,7 +510,7 @@ pub fn reset_flags() { const EXPORTED_EXPECTED: &str = r#" //! codegenerated rust flag lib use aconfig_storage_read_api::{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; // use aconfig_storage_read_api::{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; use std::path::Path; use std::io::Write; use log::{log, LevelFilter, Level}; Loading Loading @@ -584,7 +584,7 @@ pub fn enabled_ro_exported() -> bool { const FORCE_READ_ONLY_EXPECTED: &str = r#" //! codegenerated rust flag lib use aconfig_storage_read_api::{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; // use aconfig_storage_read_api::{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; use std::path::Path; use std::io::Write; use log::{log, LevelFilter, Level}; Loading
tools/aconfig/aconfig/templates/rust.template +4 −1 Original line number Diff line number Diff line //! codegenerated rust flag lib use aconfig_storage_read_api::\{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; // use aconfig_storage_read_api::\{StorageFileType, get_mapped_storage_file, get_boolean_flag_value, get_package_offset}; use std::path::Path; use std::io::Write; use log::\{log, LevelFilter, Level}; Loading Loading @@ -61,6 +61,7 @@ pub fn {flag.name}() -> bool \{ return result; } /* // This will be called multiple times. Subsequent calls after the first // are noops. logger::init( Loading Loading @@ -111,6 +112,8 @@ pub fn {flag.name}() -> bool \{ } } */ result {{ endif }} {{ -endif }} Loading