mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-09-11 07:55:34 +03:00
make description optional
This commit is contained in:
parent
e729a9c83f
commit
f514d655b6
@ -25,7 +25,7 @@ pub fn set_manifest(mut manifest: Manifest) {
|
||||
manifest.capabilities.push(Capability {
|
||||
id: feature_capability_id,
|
||||
component: None,
|
||||
description: format!("Allows the {feature} functionality"),
|
||||
description: Some(format!("Allows the {feature} functionality")),
|
||||
features: vec![feature.clone()],
|
||||
scope: Default::default(),
|
||||
});
|
||||
|
@ -2272,7 +2272,6 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"capabilities",
|
||||
"description",
|
||||
"id",
|
||||
"members"
|
||||
],
|
||||
@ -2283,7 +2282,10 @@
|
||||
},
|
||||
"description": {
|
||||
"description": "Describes the namespace in a human readable format.",
|
||||
"type": "string"
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"members": {
|
||||
"description": "The windows that can use the configuration of this namespace.",
|
||||
|
@ -1932,7 +1932,7 @@ pub struct Namespace {
|
||||
/// It is recommended to use `drop-` or `allow-` prefixes to ensure the rule can be easily categorized.
|
||||
pub id: String,
|
||||
/// Describes the namespace in a human readable format.
|
||||
pub description: String,
|
||||
pub description: Option<String>,
|
||||
/// The windows that can use the configuration of this namespace.
|
||||
pub members: Vec<String>,
|
||||
/// List of capabilities attached to this namespace.
|
||||
@ -2670,7 +2670,7 @@ mod build {
|
||||
impl ToTokens for Namespace {
|
||||
fn to_tokens(&self, tokens: &mut TokenStream) {
|
||||
let id = str_lit(&self.id);
|
||||
let description = str_lit(&self.description);
|
||||
let description = opt_str_lit(self.description.as_ref());
|
||||
let members = vec_lit(&self.members, str_lit);
|
||||
let capabilities = vec_lit(&self.capabilities, str_lit);
|
||||
|
||||
|
@ -44,7 +44,7 @@ pub struct Capability {
|
||||
/// When no value is set, it referes to the application itself.
|
||||
pub component: Option<String>,
|
||||
/// Describes the capability in a human readable format.
|
||||
pub description: String,
|
||||
pub description: Option<String>,
|
||||
/// List of features enabled by this capability.
|
||||
#[serde(default)]
|
||||
pub features: Vec<String>,
|
||||
|
@ -2272,7 +2272,6 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"capabilities",
|
||||
"description",
|
||||
"id",
|
||||
"members"
|
||||
],
|
||||
@ -2283,7 +2282,10 @@
|
||||
},
|
||||
"description": {
|
||||
"description": "Describes the namespace in a human readable format.",
|
||||
"type": "string"
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"members": {
|
||||
"description": "The windows that can use the configuration of this namespace.",
|
||||
|
Loading…
Reference in New Issue
Block a user