Skip to content

Commit

Permalink
Fix linting, fix Dockerfile builds
Browse files Browse the repository at this point in the history
  • Loading branch information
KendallWeihe committed Sep 24, 2024
1 parent ef63168 commit 4a5787f
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
members = [
"bindings/web5_uniffi",
"bindings/web5_uniffi_wrapper",
"bindings/web5_wasm", "crates/http-std",
"bindings/web5_wasm",
"crates/http-std",
"crates/web5",
"crates/web5_cli",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ WORKDIR /usr/src/myapp
COPY Cargo.toml ./
COPY bindings/web5_uniffi_wrapper ./bindings/web5_uniffi_wrapper
COPY bindings/web5_uniffi ./bindings/web5_uniffi
COPY crates/http-std ./crates/http-std
COPY crates/web5 ./crates/web5
COPY crates/web5_cli ./crates/web5_cli

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ WORKDIR /usr/src/myapp
COPY Cargo.toml ./
COPY bindings/web5_uniffi_wrapper ./bindings/web5_uniffi_wrapper
COPY bindings/web5_uniffi ./bindings/web5_uniffi
COPY crates/http-std ./crates/http-std
COPY crates/web5 ./crates/web5
COPY crates/web5_cli ./crates/web5_cli

Expand Down
3 changes: 1 addition & 2 deletions bindings/web5_wasm/src/crypto/key_managers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,5 @@ pub fn poc_key_manager_from_foreign(key_manager: &ForeignKeyManager) -> WasmSign
};

let public_jwk = key_manager.import_private_jwk(private_jwk.into());
let signer = key_manager.get_signer(public_jwk);
signer
key_manager.get_signer(public_jwk)
}
2 changes: 1 addition & 1 deletion bindings/web5_wasm/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl WasmWeb5Error {

#[wasm_bindgen(getter)]
pub fn is_web5_error(&self) -> bool {
self.is_web5_error.clone()
self.is_web5_error
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/web5/src/credentials/credential_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub(crate) fn validate_credential_schema(

let url = &credential_schema.id;

let response = http_std::fetch(&url, None)?;
let response = http_std::fetch(url, None)?;

if !(200..300).contains(&response.status_code) {
return Err(Web5Error::JsonSchema(format!(
Expand Down
5 changes: 4 additions & 1 deletion crates/web5/src/credentials/presentation_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ pub struct PresentationDefinition {

#[serde(rename = "input_descriptors")]
pub input_descriptors: Vec<InputDescriptor>,
#[serde(rename = "submission_requirements", skip_serializing_if = "Option::is_none")]
#[serde(
rename = "submission_requirements",
skip_serializing_if = "Option::is_none"
)]
pub submission_requirements: Option<Vec<SubmissionRequirement>>,
}

Expand Down
1 change: 0 additions & 1 deletion crates/web5/src/dids/methods/did_dht/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ impl DidDht {
.collect(),
),
body: Some(body),
..Default::default()
}),
)?;
if response.status_code != 200 {
Expand Down
1 change: 1 addition & 0 deletions crates/web5_cli/build/x86_64_unknown_linux_gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ WORKDIR /usr/src/myapp
COPY Cargo.toml ./
COPY bindings/web5_uniffi_wrapper ./bindings/web5_uniffi_wrapper
COPY bindings/web5_uniffi ./bindings/web5_uniffi
COPY crates/http-std ./crates/http-std
COPY crates/web5 ./crates/web5
COPY crates/web5_cli ./crates/web5_cli

Expand Down
1 change: 1 addition & 0 deletions crates/web5_cli/build/x86_64_unknown_linux_musl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ WORKDIR /usr/src/myapp
COPY Cargo.toml ./
COPY bindings/web5_uniffi_wrapper ./bindings/web5_uniffi_wrapper
COPY bindings/web5_uniffi ./bindings/web5_uniffi
COPY crates/http-std ./crates/http-std
COPY crates/web5 ./crates/web5
COPY crates/web5_cli ./crates/web5_cli

Expand Down

0 comments on commit 4a5787f

Please sign in to comment.