Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32c6ef5e authored by Mårten Kongstad's avatar Mårten Kongstad
Browse files

aconfig: simplify is_valid_container

str::split always returns at least one item (the entire string) if the
delimiter is not found. Simplify the implementation of
is_valid_container accordingly.

Bug: N/A
Test: atest aconfig.test
Change-Id: I3e92035309a7b019912710e42e69f9bdfa538795
parent 32fd2dee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ pub fn is_valid_package_ident(s: &str) -> bool {
}

pub fn is_valid_container_ident(s: &str) -> bool {
    is_valid_name_ident(s) || s.split('.').all(is_valid_name_ident)
    s.split('.').all(is_valid_name_ident)
}

pub fn create_device_config_ident(package: &str, flag_name: &str) -> Result<String> {