Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build errors #1613

Merged
merged 6 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.74.0"
2 changes: 1 addition & 1 deletion sdk/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ documentation = "https://docs.rs/azure_core"
keywords = ["sdk", "azure", "rest", "iot", "cloud"]
categories = ["api-bindings"]
edition = "2021"
rust-version = "1.70.0"
rust-version = "1.74.0"

[dependencies]
async-trait = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/src/date/iso8601.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::error::{ErrorKind, ResultExt};
use serde::{self, de, Deserialize, Deserializer, Serializer};
use serde::{de, Deserialize, Deserializer, Serializer};
use time::{
format_description::well_known::{
iso8601::{Config, EncodedConfig, TimePrecision},
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/src/date/rfc1123.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::date::{parse_rfc1123, to_rfc1123};
use serde::{self, de, Deserialize, Deserializer, Serializer};
use serde::{de, Deserialize, Deserializer, Serializer};
use time::OffsetDateTime;

pub fn deserialize<'de, D>(deserializer: D) -> Result<OffsetDateTime, D::Error>
Expand Down
1 change: 0 additions & 1 deletion sdk/core/src/request_options/max_results.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::{AppendToUrlQuery, Url};
use std::convert::TryFrom;
use std::num::NonZeroU32;

// This type forbids zero as value.
Expand Down
1 change: 0 additions & 1 deletion sdk/core/src/request_options/range.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::error::{Error, ErrorKind, ResultExt};
use crate::headers::{self, AsHeaders, HeaderName, HeaderValue};
use std::convert::From;
use std::fmt;
use std::ops::{Range as StdRange, RangeFrom};
use std::str::FromStr;
Expand Down
1 change: 0 additions & 1 deletion sdk/core/src/tokio/fs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::{
request::Body,
seekable_stream::{SeekableStream, DEFAULT_BUFFER_SIZE},
setters,
};
use futures::{task::Poll, Future};
use std::{cmp::min, io::SeekFrom, pin::Pin, sync::Arc, task::Context};
Expand Down
1 change: 0 additions & 1 deletion sdk/data_cosmos/src/authorization_policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ fn string_to_sign(
#[cfg(test)]
mod tests {
use super::*;
use azure_core::{date, Url};

#[test]
fn string_to_sign_00() {
Expand Down
1 change: 0 additions & 1 deletion sdk/data_cosmos/src/clients/collection.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use super::{DatabaseClient, UserDefinedFunctionClient};
use crate::clients::*;
use crate::operations::*;
use crate::resources::collection::PartitionKey;
Expand Down
2 changes: 1 addition & 1 deletion sdk/data_cosmos/src/operations/create_database.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{headers::from_headers::*, prelude::*, resources::Database, ResourceQuota};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
headers::{etag_from_headers, session_token_from_headers},
Response as HttpResponse,
Expand Down
2 changes: 0 additions & 2 deletions sdk/data_cosmos/src/operations/create_document.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
use crate::cosmos_entity::{add_as_partition_key_header_serialized, serialize_partition_key};
use crate::headers::from_headers::*;
use crate::prelude::*;
use crate::resources::document::DocumentAttributes;
use crate::ResourceQuota;
use azure_core::headers::{etag_from_headers, session_token_from_headers};
use azure_core::{prelude::*, StatusCode};
use serde::Serialize;
use std::convert::TryFrom;
use time::OffsetDateTime;

use azure_core::Response as HttpResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{headers::from_headers::*, prelude::*, resources::Attachment, ResourceQuota};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
headers::{etag_from_headers, session_token_from_headers},
Response as HttpResponse, SessionToken,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{headers::from_headers::*, prelude::*, resources::Attachment, ResourceQuota};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
content_type,
headers::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use crate::{
headers::from_headers::*, prelude::*, resources::trigger::*, resources::Trigger, ResourceQuota,
};
use crate::{headers::from_headers::*, prelude::*, resources::trigger::*, ResourceQuota};
use azure_core::{
headers::{etag_from_headers, session_token_from_headers},
Response as HttpResponse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{headers::from_headers::*, prelude::*, resources::UserDefinedFunction, ResourceQuota};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
headers::{etag_from_headers, session_token_from_headers},
Response as HttpResponse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{headers::from_headers::*, prelude::*, resources::StoredProcedure, ResourceQuota};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
headers::{etag_from_headers, session_token_from_headers},
Response as HttpResponse,
Expand Down
5 changes: 1 addition & 4 deletions sdk/data_cosmos/src/operations/get_attachment.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use crate::{
headers::from_headers::*, prelude::*, resources::document::IndexingDirective,
resources::Attachment, ResourceQuota,
};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
headers::{content_type_from_headers, etag_from_headers, session_token_from_headers},
prelude::*,
Expand Down
1 change: 0 additions & 1 deletion sdk/data_cosmos/src/operations/get_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::marker::PhantomData;

use crate::headers::from_headers::*;
use crate::prelude::*;
use crate::resources::Document;
use crate::ResourceQuota;
use azure_core::headers::{etag_from_headers, session_token_from_headers, Headers};
use azure_core::{from_json, prelude::*, StatusCode};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{headers::from_headers::*, prelude::*, resources::ResourceType};
use crate::{headers::from_headers::*, prelude::*};
use azure_core::{
headers::{item_count_from_headers, session_token_from_headers},
prelude::*,
Expand Down
5 changes: 1 addition & 4 deletions sdk/data_cosmos/src/operations/list_attachments.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use crate::{
headers::from_headers::*, prelude::*, resources::Attachment, resources::ResourceType,
ResourceQuota,
};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
headers::{
continuation_token_from_headers_optional, item_count_from_headers,
Expand Down
2 changes: 1 addition & 1 deletion sdk/data_cosmos/src/operations/list_collections.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{headers::from_headers::*, prelude::*, resources::Collection, ResourceQuota};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
headers::{continuation_token_from_headers_optional, session_token_from_headers},
prelude::*,
Expand Down
2 changes: 1 addition & 1 deletion sdk/data_cosmos/src/operations/list_databases.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{headers::from_headers::*, prelude::*, resources::Database, ResourceQuota};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
headers::{continuation_token_from_headers_optional, session_token_from_headers},
prelude::*,
Expand Down
2 changes: 0 additions & 2 deletions sdk/data_cosmos/src/operations/list_documents.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use crate::headers::from_headers::*;
use crate::prelude::*;
use crate::resources::document::{Document, DocumentAttributes};
use crate::resources::ResourceType;
use crate::ResourceQuota;
use azure_core::headers::{
continuation_token_from_headers_optional, item_count_from_headers, session_token_from_headers,
Expand Down
2 changes: 1 addition & 1 deletion sdk/data_cosmos/src/operations/list_permissions.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{headers::from_headers::*, prelude::*, resources::Permission, resources::ResourceType};
use crate::{headers::from_headers::*, prelude::*};
use azure_core::{
headers::{continuation_token_from_headers_optional, session_token_from_headers},
prelude::*,
Expand Down
5 changes: 1 addition & 4 deletions sdk/data_cosmos/src/operations/list_stored_procedures.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use crate::{
headers::from_headers::*, prelude::*, resources::ResourceType, resources::StoredProcedure,
ResourceQuota,
};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
headers::{continuation_token_from_headers_optional, session_token_from_headers},
prelude::*,
Expand Down
2 changes: 1 addition & 1 deletion sdk/data_cosmos/src/operations/list_triggers.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{headers::from_headers::*, prelude::*, resources::ResourceType, ResourceQuota};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
headers::item_count_from_headers,
headers::{continuation_token_from_headers_optional, session_token_from_headers},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use crate::{
headers::from_headers::*, prelude::*, resources::ResourceType, resources::UserDefinedFunction,
ResourceQuota,
};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
headers::{
continuation_token_from_headers_optional, item_count_from_headers,
Expand Down
1 change: 0 additions & 1 deletion sdk/data_cosmos/src/operations/list_users.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::{
headers::from_headers::{activity_id_from_headers, request_charge_from_headers},
prelude::*,
resources::User,
};
use azure_core::{
headers::{continuation_token_from_headers_optional, session_token_from_headers},
Expand Down
4 changes: 1 addition & 3 deletions sdk/data_cosmos/src/operations/patch_document.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use crate::{
headers::from_headers::*, prelude::*, resources::document::DocumentAttributes, ResourceQuota,
};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{headers::session_token_from_headers, Response as HttpResponse, SessionToken};
use serde::Serialize;
use serde_json::Value;
Expand Down
7 changes: 1 addition & 6 deletions sdk/data_cosmos/src/operations/query_documents.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
use crate::{
headers::from_headers::*,
prelude::*,
resources::{document::Query, ResourceType},
ResourceQuota,
};
use crate::{headers::from_headers::*, prelude::*, ResourceQuota};
use azure_core::{
from_json, headers,
headers::{
Expand Down
1 change: 0 additions & 1 deletion sdk/data_cosmos/src/operations/replace_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::{
cosmos_entity::{add_as_partition_key_header_serialized, serialize_partition_key},
headers::from_headers::*,
prelude::*,
resources::document::DocumentAttributes,
ResourceQuota,
};
use azure_core::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use super::CreateStoredProcedureResponse;
use crate::prelude::*;

operation! {
Expand Down
1 change: 0 additions & 1 deletion sdk/data_cosmos/src/resources/document/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ impl Param {
#[cfg(test)]
mod tests {
use super::*;
use serde_json;

#[test]
fn tst_query() -> azure_core::Result<()> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ pub enum PermissionTokenParseError {
#[cfg(test)]
mod tests {
use super::*;
use std::convert::TryInto;

const PERMISSION: &str = r#"type=resource&ver=1&sig=m32/00W65F8ADb3psljJ0g==;v0kQGihedau1pVGGQmuPgzlEcfsYDWSdfn2kyjDc1qF1aZfPHXzIS/BFMcuZQRUr6C5c5PgiyCSwhiAgZMJne2DorfMbE/GUHmxBLjOnykLARqwn3zpZpz9b2axWtL8+qQFX81nocdEDvBVzFuobyul6QimbmeZ7D6D1K4qJT9feuJkIBfczeAp/sKaSupXEgB3qyih0rej5N6Wv14Gufohh1QTlCRIzK3FqQv4xjcY={"#;

Expand Down
1 change: 0 additions & 1 deletion sdk/data_tables/src/entity_with_metadata.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::EntityMetadata;
use azure_core::CollectedResponse;
use serde::de::DeserializeOwned;
use std::convert::TryFrom;

#[derive(Debug, Clone)]
pub struct EntityWithMetadata<E: DeserializeOwned> {
Expand Down
1 change: 0 additions & 1 deletion sdk/data_tables/src/operations/create_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::prelude::*;
use azure_core::{headers::*, prelude::*, to_json, Method, Response};
use azure_storage::headers::CommonStorageResponseHeaders;
use serde::Serialize;
use std::convert::TryInto;

operation! {
CreateTable,
Expand Down
3 changes: 1 addition & 2 deletions sdk/data_tables/src/operations/delete_entity.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::{prelude::*, IfMatchCondition};
use crate::prelude::*;
use azure_core::{error::Error, headers::Headers, Method, Response};
use azure_storage::headers::CommonStorageResponseHeaders;
use std::convert::{TryFrom, TryInto};

operation! {
DeleteEntity,
Expand Down
1 change: 0 additions & 1 deletion sdk/data_tables/src/operations/delete_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use azure_core::{
Method, Response,
};
use azure_storage::headers::CommonStorageResponseHeaders;
use std::convert::{TryFrom, TryInto};

operation! {
DeleteTable,
Expand Down
2 changes: 1 addition & 1 deletion sdk/data_tables/src/operations/get_entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::prelude::*;
use azure_core::{headers::*, AppendToUrlQuery, Context, Etag, Method, Response};
use azure_storage::headers::CommonStorageResponseHeaders;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use std::{convert::TryInto, marker::PhantomData};
use std::marker::PhantomData;

#[derive(Debug, Clone)]
pub struct GetEntityBuilder<T> {
Expand Down
10 changes: 2 additions & 8 deletions sdk/data_tables/src/operations/insert_entity.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
use crate::{operations::*, prelude::*};
use azure_core::{
error::{Error, ErrorKind},
headers::*,
prelude::*,
Body, CollectedResponse, Context, Method,
};
use serde::de::DeserializeOwned;
use std::{convert::TryInto, marker::PhantomData};
use azure_core::{headers::*, prelude::*, Body, Method};
use std::marker::PhantomData;

#[derive(Debug, Clone)]
pub struct InsertEntityBuilder<T> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::{operations::*, prelude::*};
use azure_core::{headers::*, prelude::*, Body, CollectedResponse, Method};
use std::convert::TryInto;
use azure_core::{headers::*, prelude::*, Body, Method};

operation! {
InsertOrReplaceOrMergeEntity,
Expand Down
5 changes: 1 addition & 4 deletions sdk/data_tables/src/operations/list_tables.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use crate::prelude::*;
use azure_core::{
error::Error, headers::*, prelude::*, AppendToUrlQuery, CollectedResponse, Method, Pageable,
};
use azure_core::{error::Error, headers::*, prelude::*, CollectedResponse, Method, Pageable};
use azure_storage::headers::CommonStorageResponseHeaders;
use serde::{Deserialize, Serialize};
use std::convert::{TryFrom, TryInto};

operation! {
#[stream]
Expand Down
1 change: 0 additions & 1 deletion sdk/data_tables/src/operations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use azure_core::{
};
use azure_storage::headers::CommonStorageResponseHeaders;
use serde::de::DeserializeOwned;
use std::convert::{TryFrom, TryInto};

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum InsertOperation {
Expand Down
3 changes: 1 addition & 2 deletions sdk/data_tables/src/operations/query_entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ use azure_core::{
error::{Error, ErrorKind},
headers::*,
prelude::*,
AppendToUrlQuery, CollectedResponse, Method, Pageable,
CollectedResponse, Method, Pageable,
};
use azure_storage::headers::CommonStorageResponseHeaders;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use std::convert::{TryFrom, TryInto};

operation! {
#[stream]
Expand Down
1 change: 0 additions & 1 deletion sdk/data_tables/src/operations/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use azure_core::{
};
use azure_storage::headers::CommonStorageResponseHeaders;
use serde::Serialize;
use std::convert::{TryFrom, TryInto};
use tracing::trace;

operation! {
Expand Down
3 changes: 1 addition & 2 deletions sdk/data_tables/src/operations/update_or_merge_entity.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::{operations::*, prelude::*, IfMatchCondition};
use azure_core::{headers::*, prelude::*, Body, CollectedResponse, Method};
use std::convert::TryInto;
use azure_core::{headers::*, prelude::*, Body, Method};

operation! {
UpdateOrMergeEntity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use tracing::trace;
#[cfg(feature = "old_azure_cli")]
mod az_cli_date_format {
use azure_core::error::{ErrorKind, ResultExt};
use serde::{self, Deserialize, Deserializer};
use serde::{Deserialize, Deserializer};
use time::format_description::FormatItem;
use time::macros::format_description;
#[cfg(not(unix))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ struct MsiTokenResponse {
#[cfg(test)]
mod tests {
use super::*;
use azure_core::from_json;
use time::macros::datetime;

#[derive(Debug, Deserialize)]
Expand Down
4 changes: 2 additions & 2 deletions sdk/messaging_eventgrid/src/event.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use serde::{self, Serialize};
use serde::Serialize;
use time::OffsetDateTime;
use uuid::Uuid;

Expand Down Expand Up @@ -64,7 +64,7 @@ where
mod tests {
use super::*;
use azure_core::to_json;
use serde::{self, Serialize};
use serde::Serialize;
use time::macros::datetime;

#[derive(Serialize)]
Expand Down
Loading