Skip to content

Commit

Permalink
update comments and feature checks
Browse files Browse the repository at this point in the history
  • Loading branch information
vineetpant committed Sep 14, 2023
1 parent dcf2964 commit 0a6a90b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/api/vade_evan_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ impl VadeEvan {
.map_err(|err| err.into())
}

/// Converts a given credential to nquads Vector
/// Converts a Credential to canonized nquads
///
/// # Arguments
///
Expand Down Expand Up @@ -562,7 +562,7 @@ impl VadeEvan {
/// // currently no example for target-c-sdk and c-lib/target-java-lib
/// }
/// }
#[cfg(all(feature = "vc-zkp-bbs", feature = "did-sidetree"))]
#[cfg(all(feature = "vc-zkp-bbs"))]
pub async fn helper_convert_credential_to_nquads(
&mut self,
credential: &str,
Expand Down
2 changes: 1 addition & 1 deletion src/c_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ pub extern "C" fn execute_vade(
.map_err(stringify_vade_evan_error)
}
}),
#[cfg(all(feature = "vc-zkp-bbs", feature = "did-sidetree"))]
#[cfg(all(feature = "vc-zkp-bbs"))]
"helper_convert_credential_to_nquads" => runtime.block_on({
async {
let mut vade_evan = get_vade_evan(
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,13 @@ impl<'a> Credential<'a> {
}
}

/// Converts a Credential to nquads
/// Converts a Credential to canonized nquads
///
/// # Arguments
/// * `credential_str` - Credential to be converted
///
/// # Returns
/// * `nquads` - Vec of nquads
/// * `nquads` - Vec of canonized nquads
pub async fn convert_credential_to_nquads(
&self,
credential_str: &str,
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ async fn main() -> Result<()> {
)
.await?
}
#[cfg(all(feature = "vc-zkp-bbs", feature = "did-sidetree"))]
#[cfg(all(feature = "vc-zkp-bbs"))]
("convert_credential_to_nquads", Some(sub_m)) => {
get_vade_evan(sub_m)?
.helper_convert_credential_to_nquads(get_argument_value(
Expand Down Expand Up @@ -434,7 +434,7 @@ fn add_subcommand_helper<'a>(app: App<'a, 'a>) -> Result<App<'a, 'a>> {
}

cfg_if::cfg_if! {
if #[cfg(all(feature = "vc-zkp-bbs", feature = "did-sidetree"))] {
if #[cfg(all(feature = "vc-zkp-bbs"))] {
subcommand = subcommand.subcommand(
SubCommand::with_name("convert_credential_to_nquads")
.about("Converts a given credential to nquads vector.")
Expand Down
4 changes: 2 additions & 2 deletions src/wasm_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ cfg_if::cfg_if! {
.map_err(jsify_vade_evan_error)?)
}

#[cfg(all(feature = "vc-zkp-bbs", feature = "did-sidetree"))]
#[cfg(all(feature = "vc-zkp-bbs"))]
#[wasm_bindgen]
pub async fn helper_convert_credential_to_nquads(
credential: String,
Expand Down Expand Up @@ -810,7 +810,7 @@ pub async fn execute_vade(
Err(error) => Err(get_parsing_error_message(&error, &payload)),
}
}
#[cfg(all(feature = "vc-zkp-bbs", feature = "did-sidetree"))]
#[cfg(all(feature = "vc-zkp-bbs"))]
"helper_convert_credential_to_nquads" => {
let payload_result = parse::<HelperConvertCredentialToNquads>(&payload);
match payload_result {
Expand Down

0 comments on commit 0a6a90b

Please sign in to comment.