@@ -1061,11 +1061,11 @@ impl Operator {
1061
1061
/// use anyhow::Result;
1062
1062
/// use futures::io;
1063
1063
/// use opendal::Operator;
1064
- /// use time::Duration;
1064
+ /// use std:: time::Duration;
1065
1065
///
1066
1066
/// #[tokio::main]
1067
1067
/// async fn test(op: Operator) -> Result<()> {
1068
- /// let signed_req = op.presign_stat("test",Duration::hours(1 )).await?;
1068
+ /// let signed_req = op.presign_stat("test",Duration::from_secs(3600 )).await?;
1069
1069
/// let req = http::Request::builder()
1070
1070
/// .method(signed_req.method())
1071
1071
/// .uri(signed_req.uri())
@@ -1091,11 +1091,11 @@ impl Operator {
1091
1091
/// use anyhow::Result;
1092
1092
/// use futures::io;
1093
1093
/// use opendal::Operator;
1094
- /// use time::Duration;
1094
+ /// use std:: time::Duration;
1095
1095
///
1096
1096
/// #[tokio::main]
1097
1097
/// async fn test(op: Operator) -> Result<()> {
1098
- /// let signed_req = op.presign_read("test.txt", Duration::hours(1 )).await?;
1098
+ /// let signed_req = op.presign_read("test.txt", Duration::from_secs(3600 )).await?;
1099
1099
/// # Ok(())
1100
1100
/// # }
1101
1101
/// ```
@@ -1128,14 +1128,14 @@ impl Operator {
1128
1128
/// use anyhow::Result;
1129
1129
/// use futures::io;
1130
1130
/// use opendal::Operator;
1131
- /// use time::Duration;
1131
+ /// use std:: time::Duration;
1132
1132
/// use opendal::ops::OpRead;
1133
1133
///
1134
1134
/// #[tokio::main]
1135
1135
/// async fn test(op: Operator) -> Result<()> {
1136
1136
/// let args = OpRead::new()
1137
1137
/// .with_override_content_disposition("attachment; filename=\"othertext.txt\"");
1138
- /// let signed_req = op.presign_read_with("test.txt", args, Duration::hours(1 )).await?;
1138
+ /// let signed_req = op.presign_read_with("test.txt", args, Duration::from_secs(3600 )).await?;
1139
1139
/// # Ok(())
1140
1140
/// # }
1141
1141
/// ```
@@ -1161,11 +1161,11 @@ impl Operator {
1161
1161
/// use anyhow::Result;
1162
1162
/// use futures::io;
1163
1163
/// use opendal::Operator;
1164
- /// use time::Duration;
1164
+ /// use std:: time::Duration;
1165
1165
///
1166
1166
/// #[tokio::main]
1167
1167
/// async fn test(op: Operator) -> Result<()> {
1168
- /// let signed_req = op.presign_write("test.txt", Duration::hours(1 )).await?;
1168
+ /// let signed_req = op.presign_write("test.txt", Duration::from_secs(3600 )).await?;
1169
1169
/// # Ok(())
1170
1170
/// # }
1171
1171
/// ```
@@ -1194,12 +1194,12 @@ impl Operator {
1194
1194
/// use futures::io;
1195
1195
/// use opendal::ops::OpWrite;
1196
1196
/// use opendal::Operator;
1197
- /// use time::Duration;
1197
+ /// use std:: time::Duration;
1198
1198
///
1199
1199
/// #[tokio::main]
1200
1200
/// async fn test(op: Operator) -> Result<()> {
1201
1201
/// let args = OpWrite::new().with_content_type("text/csv");
1202
- /// let signed_req = op.presign_write_with("test", args, Duration::hours(1 )).await?;
1202
+ /// let signed_req = op.presign_write_with("test", args, Duration::from_secs(3600 )).await?;
1203
1203
/// let req = http::Request::builder()
1204
1204
/// .method(signed_req.method())
1205
1205
/// .uri(signed_req.uri())
0 commit comments