Use fixed cargo version for formatting check in CI
Our CI currently uses the Docker image rustdocker/rust:nightly for running cargo fmt -- --check in CI, to ensure that Rust code is correctly formatted. This is a problem because it is not tied to a specific nightly version, so it can update automatically and make incompatible changes to formatting requirements. It would be good if there were Docker images for specific nightly dates, but I couldnt find any in a quick search.
See https://github.com/LemmyNet/lemmy/commit/fc60b82f8264301202d6c118e8bf3c1de3f49968
It might be possible to do so by using the image digest inside of a tag. This has drawbacks like if the pinned image becomes unavailable. But it could solve this issue.
Another option would be rustup toolchain install nightly-2023-07-06. But thats slower.