@@ -90,48 +90,17 @@ impl<'a> PrettyPrinter<'a> {
93− /// Add STDIN as an input (with customized name)
95− pub fn input_stdin_with_name(&mut self, name: impl AsRef<OsStr>) -> &mut Self {
97− .push(Input::from_stdin().name(name).kind("File"));
101 /// Add a byte string as an input
93 /// Add a byte string as an input
102 pub fn input_from_bytes(&mut self, content: &'a [u8]) -> &mut Self {
94 pub fn input_from_bytes(&mut self, content: &'a [u8]) -> &mut Self {
103 self.input_from_reader(content)
95 self.input_from_reader(content)
106− /// Add a byte string as an input (with customized name)
108− #[allow(deprecated)]
109− pub fn input_from_bytes_with_name(
112− name: impl AsRef<OsStr>,
114− self.input_from_reader_with_name(content, name)
117 /// Add a custom reader as an input
98 /// Add a custom reader as an input
118 pub fn input_from_reader<R: Read + 'a>(&mut self, reader: R) -> &mut Self {
99 pub fn input_from_reader<R: Read + 'a>(&mut self, reader: R) -> &mut Self {
119 self.inputs.push(Input::from_reader(reader));
100 self.inputs.push(Input::from_reader(reader));
123− /// Add a custom reader as an input (with customized name)
125− pub fn input_from_reader_with_name<R: Read + 'a>(
128− name: impl AsRef<OsStr>,
131− .push(Input::from_reader(reader).name(name).kind("File"));
135 /// Specify the syntax file which should be used (default: auto-detect)
104 /// Specify the syntax file which should be used (default: auto-detect)
136 pub fn language(&mut self, language: &'a str) -> &mut Self {
105 pub fn language(&mut self, language: &'a str) -> &mut Self {
137 self.config.language = Some(language);
106 self.config.language = Some(language);
@@ -188,19 +157,9 @@ impl<'a> PrettyPrinter<'a> {
189 /// Whether to show modification markers for VCS changes. This has no effect if
158 /// Whether to show modification markers for VCS changes. This has no effect if
190 /// the `git` feature is not activated.
159 /// the `git` feature is not activated.
192− not(feature = "git"),
160+ #[cfg(feature = "git")]
194− note = "Using vcs_modification_markers without the 'git' feature has no effect. \
195− The function will be removed (for non-'git' use cases) in the future."
198− #[allow(unused_variables)]
199 pub fn vcs_modification_markers(&mut self, yes: bool) -> &mut Self {
161 pub fn vcs_modification_markers(&mut self, yes: bool) -> &mut Self {
200− #[cfg(feature = "git")]
202− self.active_style_components.vcs_modification_markers = yes;
162+ self.active_style_components.vcs_modification_markers = yes;