forked from Proxmox/proxmox
This way we can assign `API_SCHEMA` constants to `Option` types. Here's why: The api-macro generated code usese `T::API_SCHEMA` when building ObjectSchemas. For Updaters we replace `T` with `<T as Updatable>::Updater` This means for "simple" wrappers like our `Authid` or `Userid`, the ObjectSchema will try to refer to `<Authid as Updatable>::Updater::API_SCHEMA` which resolves to: `Option<Authid>::API_SCHEMA` which does not exist, for which we cannot add a normal `impl` block to add the schema variable, since `Option` is not "ours". But we now have a blanket implementation of `ApiType` for `Option<T> where T: ApiType` which just points to the original `T::API_SCHEMA`. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Local cargo config ================== This repository ships with a ``.cargo/config`` that replaces the crates.io registry with packaged crates located in ``/usr/share/cargo/registry``. A similar config is also applied building with dh_cargo. Cargo.lock needs to be deleted when switching between packaged crates and crates.io, since the checksums are not compatible. To reference new dependencies (or updated versions) that are not yet packaged, the dependency needs to point directly to a path or git source. Steps for Releases ================== - Cargo.toml updates: - Bump all modified crate versions. - Update all the other crates' Cargo.toml to depend on the new versions if required, then bump their version as well if not already done. - Update debian/changelog files in all the crates updated above. - Build packages with `make deb`.
Description
Languages
Rust
99.7%
Makefile
0.2%
Shell
0.1%