Commit Graph

131 Commits

Author SHA1 Message Date
Scott Boggs 21dd421656 Move prelude use statements to separate fn 2023-01-03 07:02:36 -05:00
Matthias Beyer faf0cda10c Add test for API exports
This patch adds a test file that only tries to import everything that's
exposed from the crate API, so we do not accidentially vanish something
from the API.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-03 07:02:36 -05:00
dependabot[bot] c497e11b4d Update url requirement from 1 to 2
Updates the requirements on [url](https://github.com/servo/rust-url) to permit the latest version.
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v1.0.0...v2.3.1)

---
updated-dependencies:
- dependency-name: url
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-02 07:17:24 -05:00
Matthias Beyer e328924193 Add rust-cache in CI workflow
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2023-01-01 11:25:02 -05:00
D. Scott Boggs f830671ee9 Make tokio's rt-multi-thread enabled again in examples 2023-01-01 11:22:43 -05:00
D. Scott Boggs 6ba0cd03f8 Drop unnecessary tokio feature dependency 2022-12-30 07:16:29 -05:00
Matthias Beyer c32f628c49 Make Registered::complete() accept an AsRef<str>
This patch changes the signature of `Registered::complete` to accept an
`AsRef<str>`. This _should_ be backwards compatible to the old version.

This change was implemented as it has the neat benefit that a user can
implement a type that does not implement `Debug` or `Display`, but only
`AsRef<str>`.
This can be done to ensure that the access code is not accidentially
shown in log output, which might be pasted to some code forge for bug
reporting.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-29 14:07:09 -05:00
D. Scott Boggs f037379d0f drop dependency on hyper-old-types in favor of parse_link_header 2022-12-29 14:06:07 -05:00
Matthias Beyer 5832111f46 Replace dependency "chrono" with "time"
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-29 13:43:26 -05:00
D. Scott Boggs 96fbef900e Change error implementation to use thiserror 2022-12-29 13:27:41 -05:00
D. Scott Boggs d2cdd8e514 Add debugging note to the README 2022-12-29 12:19:23 -05:00
Matthias Beyer 346ac52f30 Add workflow job to check formatting
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-29 07:14:00 -05:00
Matthias Beyer c689b8390c Run cargo-fmt on whole codebase
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-29 07:14:00 -05:00
Matthias Beyer d61c2e5c91 Empty rustfmt configuration for default settings
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-29 07:14:00 -05:00
Matthias Beyer 89f9efe639 Add workflow job to build examples
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-29 06:42:50 -05:00
D. Scott Boggs 351bb0741b spelling and clippy fixes 2022-12-29 06:41:57 -05:00
Matthias Beyer 963a3323ea Optimize: Remove clone() call
This patch makes the `Headers` helper type that is only used to be able
to implement Serialize on it only contain a reference to the actual
headers. This way we don't need to clone() the object returned by
`reqwest::Repsonse::headers()`.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-29 05:58:30 -05:00
Scott Boggs 520247fade
Merge pull request #26 from dscottboggs/fix/clone-as-into
Fix/clone as into
2022-12-28 16:31:15 -05:00
D. Scott Boggs 5c764185bb Rewrite awkward code 2022-12-28 15:35:39 -05:00
Scott Boggs ed55570646
Merge pull request #20 from dscottboggs/dependabot/cargo/serde_urlencoded-0.7.1
Update serde_urlencoded requirement from 0.6.1 to 0.7.1
2022-12-28 10:17:35 -05:00
dependabot[bot] cd64bbb150
Update serde_urlencoded requirement from 0.6.1 to 0.7.1
Updates the requirements on [serde_urlencoded](https://github.com/nox/serde_urlencoded) to permit the latest version.
- [Release notes](https://github.com/nox/serde_urlencoded/releases)
- [Commits](https://github.com/nox/serde_urlencoded/commits)

---
updated-dependencies:
- dependency-name: serde_urlencoded
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-28 14:48:26 +00:00
Scott Boggs 3dfd7e3e36
Merge pull request #19 from dscottboggs/dependabot/cargo/url-2
Update url requirement from 1 to 2
2022-12-28 09:47:37 -05:00
Scott Boggs 08357919e5
Merge pull request #25 from matthiasbeyer/remove-makefile
Remove Makefile
2022-12-28 09:42:32 -05:00
D. Scott Boggs f82725c9dc Add dependency on percent_encoding
percent_encoding used to be a part of url before v2.
2022-12-28 09:39:49 -05:00
Scott Boggs 5ec4ad7166
Merge pull request #18 from dscottboggs/dependabot/cargo/serde_qs-0.10.1
Update serde_qs requirement from 0.4.5 to 0.10.1
2022-12-28 09:37:49 -05:00
Matthias Beyer de1b3769f8
Remove Makefile
This was used to build a mdbook, but there's no mdbook in the codebase.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-28 15:28:57 +01:00
dependabot[bot] 3b9e1833d5
Update serde_qs requirement from 0.4.5 to 0.10.1
Updates the requirements on [serde_qs](https://github.com/samscott89/serde_qs) to permit the latest version.
- [Release notes](https://github.com/samscott89/serde_qs/releases)
- [Commits](https://github.com/samscott89/serde_qs/commits)

---
updated-dependencies:
- dependency-name: serde_qs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-28 13:57:25 +00:00
Scott Boggs 4287c7526f
Merge pull request #13 from dscottboggs/fix/magic-is-not-send
no more magic
2022-12-28 08:56:42 -05:00
Scott Boggs 3895570cb4
Merge pull request #17 from matthiasbeyer/dependabot
Add monthly dependabot jobs
2022-12-28 08:53:12 -05:00
D. Scott Boggs 4fb24a5a21 Drop the magic bullshit
There were too many false positive responses from libmagic to have this
just happen in the background. In a future release I may add a specific
error which is returned when the given file has no extension, and
downstream application developers can use that as an indicator that they
should ask the user if they want to detect the filetype, making use of
libmagic directly in the downstream application as appropriate.
2022-12-28 08:49:43 -05:00
D. Scott Boggs 7653513c6f Wrap magic cookie in a mutex
This commit also includes benchmarks proving the viability of reloading the
magic database for every filetype request, should that become necessary.
2022-12-28 08:49:43 -05:00
Scott Boggs 8516091c5b
Merge pull request #14 from matthiasbeyer/clippy
Fix clippy warnings and add CI check
2022-12-28 08:45:46 -05:00
Matthias Beyer 29463764c1
Fix clippy: Derive Eq for Data
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:08:43 +01:00
Matthias Beyer afb3f59fc7
Fix clippy: Derive Eq for MediaType
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:08:24 +01:00
Matthias Beyer 8cfe447aa1
Fix clippy: Derive Eq for Card
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:08:13 +01:00
Matthias Beyer ee4e00affd
Fix clippy: Derive Eq for Filter
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:07:51 +01:00
Matthias Beyer 609ddc895b
Fix clippy: Derive Eq for AddFilterRequest
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:07:24 +01:00
Matthias Beyer 789fbd69f5
Fix clippy: Derive Eq for FilterContext
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:05:52 +01:00
Matthias Beyer bf9bad441f
Fix clippy: Derive Eq for StreamingApi
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:05:31 +01:00
Matthias Beyer 738d97d65f
Fix clippy: Derive Eq for Stats
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:05:05 +01:00
Matthias Beyer 0e2ee6717f
Fix clippy: Derive Eq for List
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:04:53 +01:00
Matthias Beyer e3539a46ba
Fix clippy: Derive Eq for Mention
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:04:40 +01:00
Matthias Beyer eaea2a50bd
Fix clippy: Derive Eq for Form
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:04:15 +01:00
Matthias Beyer 4cadd9b937
Fix clippy: Derive Eq for Data
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:04:11 +01:00
Matthias Beyer 9cec1a7384
Fix clippy: Derive Eq for Data
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:04:05 +01:00
Matthias Beyer fcb8dc9e07
Fix clippy: Derive Eq for Keys
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:03:57 +01:00
Matthias Beyer 31ad0beec1
Fix clippy: Derive Eq for Subscription
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:03:43 +01:00
Matthias Beyer bb31b91933
Fix clippy: Derive Eq for Subscription
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:03:24 +01:00
Matthias Beyer 8ee0de9a6f
Fix clippy: Derive Eq for Alerts
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:03:11 +01:00
Matthias Beyer b97dc8ca3e
Fix: Tag type is not able to derive Eq
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-12-27 19:01:54 +01:00