Skip to content

Commit

Permalink
missing merged file added
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Apr 26, 2024
1 parent c4f7a49 commit 7f2e7a5
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions commons/zenoh-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use validated_struct::ValidatedMapAssociatedTypes;
pub use validated_struct::{GetError, ValidatedMap};
use zenoh_core::zlock;
pub use zenoh_protocol::core::{
whatami, EndPoint, Locator, WhatAmI, WhatAmIMatcher, WhatAmIMatcherVisitor, ZenohId,
whatami, EndPoint, Locator, Priority, WhatAmI, WhatAmIMatcher, WhatAmIMatcherVisitor, ZenohId,
};
use zenoh_protocol::{
core::{key_expr::OwnedKeyExpr, Bits},
Expand Down Expand Up @@ -482,9 +482,6 @@ validated_struct::validator! {
/// To use it, you must enable zenoh's <code>unstable</code> feature flag.
/// </div>
AdminSpaceConf {
/// Enable the admin space
#[serde(default = "set_false")]
pub enabled: bool,
/// Permissions on the admin space
pub permissions:
PermissionsConf {
Expand All @@ -510,11 +507,7 @@ validated_struct::validator! {

/// A list of directories where plugins may be searched for if no `__path__` was specified for them.
/// The executable's current directory will be added to the search paths.
pub plugins_loading: #[derive(Default)]
PluginsLoading {
pub enabled: bool,
pub search_dirs: Option<Vec<String>>, // TODO (low-prio): Switch this String to a PathBuf? (applies to other paths in the config as well)
},
plugins_search_dirs: Vec<String>, // TODO (low-prio): Switch this String to a PathBuf? (applies to other paths in the config as well)
#[validated(recursive_accessors)]
/// The configuration for plugins.
///
Expand Down Expand Up @@ -728,13 +721,10 @@ impl Config {
}

pub fn libloader(&self) -> LibLoader {
if self.plugins_loading.enabled {
match self.plugins_loading.search_dirs() {
Some(dirs) => LibLoader::new(dirs, true),
None => LibLoader::default(),
}
if self.plugins_search_dirs.is_empty() {
LibLoader::default()
} else {
LibLoader::empty()
LibLoader::new(&self.plugins_search_dirs, true)
}
}
}
Expand Down

0 comments on commit 7f2e7a5

Please sign in to comment.