Skip to content

Commit

Permalink
Fixed a few more nightly lints (#1901)
Browse files Browse the repository at this point in the history
Made sure we're actually checking everything as well.
  • Loading branch information
heaths authored Nov 6, 2024
1 parent 0cede91 commit 673d5c6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
4 changes: 2 additions & 2 deletions eng/scripts/Analyze-Code.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ Write-Host "Analyzing code with
$env:RUSTDOCFLAGS = "-D warnings"
$env:RUSTFLAGS = "-Dwarnings"

Invoke-LoggedCommand "cargo +$Toolchain check -p azure_core --no-default-features --keep-going"
Invoke-LoggedCommand "cargo +$Toolchain check -p azure_core --all-features --all-targets --keep-going"

Invoke-LoggedCommand "cargo +$Toolchain fmt --all -- --check"

Invoke-LoggedCommand "cargo +$Toolchain clippy --workspace --keep-going --no-deps"
Invoke-LoggedCommand "cargo +$Toolchain clippy --workspace --all-features --all-targets --keep-going --no-deps"

Invoke-LoggedCommand "cargo +$Toolchain doc --workspace --no-deps"

Expand Down
16 changes: 15 additions & 1 deletion eng/scripts/Test-Packages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,23 @@ foreach ($package in $packagesToTest) {

Invoke-LoggedCommand "cargo +$Toolchain build --keep-going"
Write-Host "`n`n"
Invoke-LoggedCommand "cargo +$Toolchain test --lib --no-fail-fast"

$targets = @()
if ($UnitTests) {
$targets += "--lib"
}

if ($FunctionalTests) {
$targets += "--bins"
$targets += "--examples"
$targets += "--benches"
}

Invoke-LoggedCommand "cargo +$Toolchain test $($targets -join ' ') --no-fail-fast"
Write-Host "`n`n"

Invoke-LoggedCommand "cargo +$Toolchain test --doc --no-fail-fast"
Write-Host "`n`n"
}
finally {
Pop-Location
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure_data_cosmos/src/clients/cosmos_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl CosmosClient {
databases_link: ResourceLink::root(ResourceType::Databases),
pipeline: CosmosPipeline::new(
endpoint.parse()?,
AuthorizationPolicy::from_shared_key(key.into()),
AuthorizationPolicy::from_shared_key(key),
options.client_options,
),
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ mod client {
pub async fn put_binary_data(
body: RequestContent<()>,
) -> typespec_client_core::Result<Response<()>> {
let body: RequestContent<()> = body.into();
let body: Body = body.into();

let content = match body {
Expand Down
2 changes: 1 addition & 1 deletion sdk/typespec/typespec_client_core/src/error/http_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl fmt::Debug for HttpError {
impl fmt::Display for HttpError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
struct Unquote<'a>(&'a str);
impl<'a> fmt::Debug for Unquote<'a> {
impl fmt::Debug for Unquote<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(self.0)
}
Expand Down

0 comments on commit 673d5c6

Please sign in to comment.