Skip to content

Commit 673d5c6

Browse files
authored
Fixed a few more nightly lints (Azure#1901)
Made sure we're actually checking everything as well.
1 parent 0cede91 commit 673d5c6

File tree

5 files changed

+19
-6
lines changed

5 files changed

+19
-6
lines changed

eng/scripts/Analyze-Code.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Write-Host "Analyzing code with
1818
$env:RUSTDOCFLAGS = "-D warnings"
1919
$env:RUSTFLAGS = "-Dwarnings"
2020

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

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

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

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

eng/scripts/Test-Packages.ps1

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,23 @@ foreach ($package in $packagesToTest) {
4949

5050
Invoke-LoggedCommand "cargo +$Toolchain build --keep-going"
5151
Write-Host "`n`n"
52-
Invoke-LoggedCommand "cargo +$Toolchain test --lib --no-fail-fast"
52+
53+
$targets = @()
54+
if ($UnitTests) {
55+
$targets += "--lib"
56+
}
57+
58+
if ($FunctionalTests) {
59+
$targets += "--bins"
60+
$targets += "--examples"
61+
$targets += "--benches"
62+
}
63+
64+
Invoke-LoggedCommand "cargo +$Toolchain test $($targets -join ' ') --no-fail-fast"
5365
Write-Host "`n`n"
66+
5467
Invoke-LoggedCommand "cargo +$Toolchain test --doc --no-fail-fast"
68+
Write-Host "`n`n"
5569
}
5670
finally {
5771
Pop-Location

sdk/cosmos/azure_data_cosmos/src/clients/cosmos_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl CosmosClient {
8282
databases_link: ResourceLink::root(ResourceType::Databases),
8383
pipeline: CosmosPipeline::new(
8484
endpoint.parse()?,
85-
AuthorizationPolicy::from_shared_key(key.into()),
85+
AuthorizationPolicy::from_shared_key(key),
8686
options.client_options,
8787
),
8888
})

sdk/typespec/typespec_client_core/examples/binary_data_request.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ mod client {
4545
pub async fn put_binary_data(
4646
body: RequestContent<()>,
4747
) -> typespec_client_core::Result<Response<()>> {
48-
let body: RequestContent<()> = body.into();
4948
let body: Body = body.into();
5049

5150
let content = match body {

sdk/typespec/typespec_client_core/src/error/http_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl fmt::Debug for HttpError {
104104
impl fmt::Display for HttpError {
105105
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
106106
struct Unquote<'a>(&'a str);
107-
impl<'a> fmt::Debug for Unquote<'a> {
107+
impl fmt::Debug for Unquote<'_> {
108108
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
109109
f.write_str(self.0)
110110
}

0 commit comments

Comments
 (0)