Skip to content

Commit bb6c5af

Browse files
authored
Merge pull request #53 from Lurk/chore
Chore
2 parents 3a39c5a + f4788e2 commit bb6c5af

File tree

5 files changed

+34
-34
lines changed

5 files changed

+34
-34
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ jobs:
7979
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
8080
strategy:
8181
matrix:
82-
msrv: [1.65.0] # due to let-else
83-
name: ubuntu / ${{ matrix.msrv }}
82+
msrv: [1.83.0] # due to icu_collections@2.1.1
83+
name: ubuntu / ${{ matrix.msrv }}
8484
steps:
8585
- uses: actions/checkout@v4
8686
with:

Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@ name = "cloudinary"
33
description = "A Rust library for the Cloudinary API"
44
license = "MIT OR Apache-2.0"
55
keywords = ["cloudinary", "api", "image", "video", "upload"]
6-
version = "0.8.1"
6+
version = "0.8.2"
77
edition = "2021"
8-
rust-version = "1.65.0" # due to let-else
8+
rust-version = "1.83.0" # due to icu_collections@2.1.1
99
repository = "https://github.com/Lurk/cloudinary_rs"
1010

1111

1212
[dependencies]
13-
anyhow = "1.0.89"
14-
chrono = "0.4.38"
15-
itertools = "0.13.0"
13+
anyhow = "1.0.100"
14+
chrono = "0.4.42"
15+
itertools = "0.14.0"
1616
mime = "0.3.17"
1717
reqwest = { version = "0.12.24", features = [
1818
"json",
1919
"multipart",
2020
"stream",
2121
"rustls-tls",
2222
] }
23-
serde = { version = "1.0.210", features = ["derive", "rc"] }
24-
serde_json = "1.0.128"
23+
serde = { version = "1.0.228", features = ["derive", "rc"] }
24+
serde_json = "1.0.145"
2525
sha1 = "0.10.6"
26-
tokio = { version = "1.40.0", features = ["rt", "macros"] }
27-
tokio-util = "0.7.12"
28-
url = "2.5.2"
26+
tokio = { version = "1.48.0", features = ["rt", "macros"] }
27+
tokio-util = "0.7.17"
28+
url = "2.5.7"
2929

3030
[dev-dependencies]
3131
dotenv = "0.15.0"

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ CLOUDINARY_CLOUD_NAME_1=***
300300

301301
## Minimum supported Rust version
302302

303-
The minimum supported Rust version for this crate is 1.65
303+
MSRV: 1.83
304304

305305

306306
License: MIT OR Apache-2.0

src/transformation/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl Image {
9797

9898
match self.get_format() {
9999
Some(format) => {
100-
let file_name = self.public_id.split('/').last().unwrap().to_string();
100+
let file_name = self.public_id.split('/').next_back().unwrap().to_string();
101101

102102
let new_file_name = format!("{}.{}", file_name, format);
103103
url.set_path(

src/upload/options.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ pub enum OptionalParameters {
2727
/// **NOTE:**
2828
///
2929
/// - The public ID value for images and videos should not include a file extension. Include
30-
/// the file extension for raw files only.
30+
/// the file extension for raw files only.
3131
/// - Can be up to 255 characters, including:
3232
/// - non-English characters
3333
/// - periods `.`
3434
/// - forward slashes `/`
3535
/// - underscores `_`
3636
/// - hyphens `-`
3737
/// - [Public ID](OptionalParameters::PublicId) values cannot begin or end with a space or forward slash `/`.
38-
/// Additionally, they cannot include the following characters: `? & # \ % < > +`
38+
/// Additionally, they cannot include the following characters: `? & # \ % < > +`
3939
PublicId(String),
4040
/// A string or path that's automatically prepended to the public_id with a forward slash. The
4141
/// value can contain the same characters as the public_id including additional forward
@@ -159,11 +159,11 @@ pub enum OptionalParameters {
159159
/// Possible values for each access type:
160160
///
161161
/// - token requires either Token-based access or Cookie-based access for accessing the asset.
162-
/// For example: access_type: "token"
162+
/// For example: access_type: "token"
163163
/// - anonymous allows public access to the asset. The anonymous access type can optionally include start and/or
164-
/// end dates (in ISO 8601 format) that define when the asset is publicly available. Note that you can only
165-
/// include a single 'anonymous' access type.
166-
/// For example: `access_type: "anonymous", start: "2017-12-15T12:00Z", end: "2018-01-20T12:00Z"`
164+
/// end dates (in ISO 8601 format) that define when the asset is publicly available. Note that you can only
165+
/// include a single 'anonymous' access type.
166+
/// For example: `access_type: "anonymous", start: "2017-12-15T12:00Z", end: "2018-01-20T12:00Z"`
167167
AccessControl(String),
168168
/// Allows the asset to behave as if it's of the authenticated 'type' (see above) while still using the default
169169
/// 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the
@@ -275,7 +275,7 @@ pub enum OptionalParameters {
275275
///
276276
/// - Returned metadata for images includes: PixelsPerUnitX, PixelsPerUnitY, PixelUnits, Colorspace, and DPI.
277277
/// - Returned metadata for audio and video includes: audio_codec, audio_bit_rate, audio_frequency, channels,
278-
/// channel_layout.
278+
/// channel_layout.
279279
/// - Additional metadata for video includes: pix_format, codec, level, profile, video_bit_rate, dar.
280280
///
281281
/// (In .NET SDK, parameter name is Metadata.)
@@ -326,14 +326,14 @@ pub enum OptionalParameters {
326326
/// Set to:
327327
///
328328
/// - \<content-aware model>_[\<version>] (e.g. coco_v2) to return a list of detected content using the
329-
/// [Cloudinary AI Content Analysis add-on](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#automatic_image_tagging).
330-
/// Can be used together with the auto_tagging parameter to apply tags automatically.
329+
/// [Cloudinary AI Content Analysis add-on](https://cloudinary.com/documentation/cloudinary_ai_content_analysis_addon#automatic_image_tagging).
330+
/// Can be used together with the auto_tagging parameter to apply tags automatically.
331331
/// - `captioning` to analyze an image and suggest a caption based on the image's contents.
332332
/// - `iqa` to analyze the quality of an image.
333333
/// - `adv_face` to return a list of facial attributes using the Advanced Facial Attribute Detection add-on.
334334
/// - `aws_rek_face` to return a list of detected celebrities and facial attributes using the Amazon Rekognition
335-
/// Celebrity Detection add-on. Can be used together with the `auto_tagging` parameter to apply
336-
/// tags automatically.
335+
/// Celebrity Detection add-on. Can be used together with the `auto_tagging` parameter to apply
336+
/// tags automatically.
337337
///
338338
/// Relevant for images only.
339339
/// TODO: Better type
@@ -427,10 +427,10 @@ pub enum OptionalParameters {
427427
/// Automatically remove the background of an image using an add-on.
428428
///
429429
/// - Set to cloudinary_ai to use the deep-learning based
430-
/// [Cloudinary AI Background Removal add-on](https://cloudinary.com/documentation/cloudinary_ai_background_removal_addon#removing_the_background_on_upload_update). NOTE: this feature has been superseded by
431-
/// [background removal on the fly](https://cloudinary.com/documentation/cloudinary_ai_background_removal_addon#removing_the_background_on_the_fly).
430+
/// [Cloudinary AI Background Removal add-on](https://cloudinary.com/documentation/cloudinary_ai_background_removal_addon#removing_the_background_on_upload_update). NOTE: this feature has been superseded by
431+
/// [background removal on the fly](https://cloudinary.com/documentation/cloudinary_ai_background_removal_addon#removing_the_background_on_the_fly).
432432
/// - Set to pixelz to use the human-powered
433-
/// [Pixelz Remove-The-Background Editing add-on service](https://cloudinary.com/documentation/remove_the_background_image_editing_addon).
433+
/// [Pixelz Remove-The-Background Editing add-on service](https://cloudinary.com/documentation/remove_the_background_image_editing_addon).
434434
///
435435
/// Relevant for images only.
436436
///
@@ -439,14 +439,14 @@ pub enum OptionalParameters {
439439
/// Generates a related file based on the uploaded file.
440440
///
441441
/// - Set to `aspose` to automatically create a PDF or other image format from a `raw` Office document using the
442-
/// [Aspose Document Conversion add-on](https://cloudinary.com/documentation/aspose_document_conversion_addon).
443-
/// (Asynchronous)
442+
/// [Aspose Document Conversion add-on](https://cloudinary.com/documentation/aspose_document_conversion_addon).
443+
/// (Asynchronous)
444444
/// - Set to `google_speech` to instruct the
445-
/// [Google AI Video Transcription](https://cloudinary.com/documentation/google_ai_video_transcription_addon)
446-
/// add-on to generate an automatic transcript raw file from an uploaded video. (Asynchronous)
445+
/// [Google AI Video Transcription](https://cloudinary.com/documentation/google_ai_video_transcription_addon)
446+
/// add-on to generate an automatic transcript raw file from an uploaded video. (Asynchronous)
447447
/// - Set to `extract_text` to extract all the text from a PDF file and store it in a `raw` JSON file with a
448-
/// public ID in the format: `[pdf_public_id].extract_text.json`. The full URL of the generated JSON file is
449-
/// included in the API response. (Synchronous)
448+
/// public ID in the format: `[pdf_public_id].extract_text.json`. The full URL of the generated JSON file is
449+
/// included in the API response. (Synchronous)
450450
///
451451
/// See also:
452452
/// [Converting raw files](https://cloudinary.com/documentation/upload_parameters#uploading_non_media_files_as_raw_files).

0 commit comments

Comments
 (0)