public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup(-qemu) 00/17] clippy refactorings
Date: Mon, 25 Jan 2021 14:42:45 +0100	[thread overview]
Message-ID: <20210125134302.3394328-1-f.gruenbichler@proxmox.com> (raw)

various parameter/types refactorings to simplify function
signatures/return types/...

I am grateful for suggestions on better names ;)

I tried to order/group the patches so that they also apply
individually/as sub-groups.

with all of these, we are now down to some very recently touched files
with trivial fixes that I didn't want to change since I suspected them
to be still under development, and one missing docs lint:

warning: unsafe function's docs miss `# Safety` section
  --> src/tools/fs.rs:78:5
   |
78 | /     pub unsafe fn file_name_utf8_unchecked(&self) -> &str {
79 | |         std::str::from_utf8_unchecked(self.file_name().to_bytes())
80 | |     }
   | |_____^

proxmox-backup:
  report: type-alias function call tuple
  broadcast_future: refactor broadcast/future binding
  client: refactor catalog upload spawning
  allow complex Futures in tower_service impl
  async index reader: typedef ReadFuture
  systemd/time: extract Time/DateSpec structs
  client: factor out UploadOptions
  pxar: typedef on_error as ErrorHandler
  pxar: factor out PxarCreateOptions
  pxar: extract PxarExtractOptions
  authid: make Tokenname(Ref) derive Eq
  derive/impl and use Default for some structs
  verify: factor out common parameters
  clippy: allow api functions with many arguments
  clippy: more misc fixes

 examples/download-speed.rs             |   2 +-
 examples/upload-speed.rs               |   2 +-
 src/api2/access/acl.rs                 |   1 +
 src/api2/access/tfa.rs                 |   1 +
 src/api2/access/user.rs                |   1 +
 src/api2/admin/datastore.rs            |  19 +--
 src/api2/backup/environment.rs         |  10 +-
 src/api2/config/datastore.rs           |   1 +
 src/api2/config/remote.rs              |   5 +-
 src/api2/config/sync.rs                |   1 +
 src/api2/config/verify.rs              |   1 +
 src/api2/node/network.rs               |   2 +
 src/api2/node/tasks.rs                 |   1 +
 src/api2/types/userid.rs               |  52 +-------
 src/backup/async_index_reader.rs       |   4 +-
 src/backup/prune.rs                    |   1 +
 src/backup/verify.rs                   | 174 +++++++++++--------------
 src/bin/proxmox-backup-client.rs       | 162 +++++++++++++----------
 src/bin/proxmox-daily-update.rs        |   9 +-
 src/bin/proxmox_backup_client/key.rs   |  24 +---
 src/bin/proxmox_backup_client/mount.rs |   2 +-
 src/bin/proxmox_backup_manager/user.rs |   4 +-
 src/bin/pxar.rs                        |  54 ++++----
 src/client.rs                          |  11 +-
 src/client/backup_writer.rs            |  46 ++++---
 src/client/http_client.rs              |  38 ++++--
 src/client/pull.rs                     |   4 +-
 src/client/pxar_backup_stream.rs       |  28 +---
 src/config/acl.rs                      |   8 +-
 src/config/network.rs                  |   2 +-
 src/pxar/create.rs                     |  28 +++-
 src/pxar/extract.rs                    |  24 ++--
 src/pxar/mod.rs                        |   4 +-
 src/rrd/mod.rs                         |   1 +
 src/server/h2service.rs                |   5 +-
 src/server/report.rs                   |   6 +-
 src/server/rest.rs                     |   3 +-
 src/server/verify_job.rs               |   3 +-
 src/tools/broadcast_future.rs          |  38 ++----
 src/tools/http.rs                      |   5 +-
 src/tools/systemd/parse_time.rs        |  41 ++++--
 tests/catar.rs                         |  10 +-
 42 files changed, 414 insertions(+), 424 deletions(-)

proxmox-backup-qemu:
  use UploadOptions for uploading Blobs
  use new HttpClientOptions constructors

 src/backup.rs   |  7 ++++---
 src/commands.rs | 15 +++++++++++++--
 src/lib.rs      |  8 +++++---
 src/restore.rs  |  7 ++++---
 4 files changed, 26 insertions(+), 11 deletions(-)

-- 
2.20.1





             reply	other threads:[~2021-01-25 13:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 13:42 Fabian Grünbichler [this message]
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 01/15] report: type-alias function call tuple Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 02/15] broadcast_future: refactor broadcast/future binding Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 03/15] client: refactor catalog upload spawning Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 04/15] allow complex Futures in tower_service impl Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 05/15] async index reader: typedef ReadFuture Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 06/15] systemd/time: extract Time/DateSpec structs Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 07/15] client: factor out UploadOptions Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 08/15] pxar: typedef on_error as ErrorHandler Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 09/15] pxar: factor out PxarCreateOptions Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 10/15] pxar: extract PxarExtractOptions Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 11/15] authid: make Tokenname(Ref) derive Eq Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 12/15] derive/impl and use Default for some structs Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 13/15] verify: factor out common parameters Fabian Grünbichler
2021-01-25 13:42 ` [pbs-devel] [PATCH proxmox-backup 14/15] clippy: allow api functions with many arguments Fabian Grünbichler
2021-01-25 13:43 ` [pbs-devel] [PATCH proxmox-backup 15/15] clippy: more misc fixes Fabian Grünbichler
2021-01-25 13:43 ` [pbs-devel] [PATCH proxmox-backup-qemu 1/2] use UploadOptions for uploading Blobs Fabian Grünbichler
2021-01-25 13:43 ` [pbs-devel] [PATCH proxmox-backup-qemu 2/2] use new HttpClientOptions constructors Fabian Grünbichler
2021-01-26  9:44 ` [pbs-devel] applied series: [PATCH proxmox-backup(-qemu) 00/17] clippy refactorings Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210125134302.3394328-1-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal