Create dummy format CLI (#4453)

* Create dummy format CLI

* Hide format from clap, too

Missed that this is a separate option from `#[doc(hidden)]`

* Remove cargo feature and replace with warning

* No-alloc files parameter matching

* beta warning: warn -> warn_user_once

* Rephrase warning
This commit is contained in:
konstin 2023-05-19 11:45:52 +02:00 committed by GitHub
parent 2f35099f81
commit 32f1edc555
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 4 deletions

View file

@ -11,7 +11,7 @@ use crate::args::Overrides;
use crate::diagnostics::{lint_stdin, Diagnostics};
/// Read a `String` from `stdin`.
fn read_from_stdin() -> Result<String> {
pub(crate) fn read_from_stdin() -> Result<String> {
let mut buffer = String::new();
io::stdin().lock().read_to_string(&mut buffer)?;
Ok(buffer)