@@ -90,48 +90,17 @@ impl<'a> PrettyPrinter<'a> {
9090 self
9191 }
9292
93− /// Add STDIN as an input (with customized name)
94− #[deprecated]
95− pub fn input_stdin_with_name(&mut self, name: impl AsRef<OsStr>) -> &mut Self {
96− self.inputs
97− .push(Input::from_stdin().name(name).kind("File"));
98− self
99− }
100−
10193 /// Add a byte string as an input
10294 pub fn input_from_bytes(&mut self, content: &'a [u8]) -> &mut Self {
10395 self.input_from_reader(content)
10496 }
10597
106− /// Add a byte string as an input (with customized name)
107− #[deprecated]
108− #[allow(deprecated)]
109− pub fn input_from_bytes_with_name(
110− &mut self,
111− content: &'a [u8],
112− name: impl AsRef<OsStr>,
113− ) -> &mut Self {
114− self.input_from_reader_with_name(content, name)
115− }
116−
11798 /// Add a custom reader as an input
11899 pub fn input_from_reader<R: Read + 'a>(&mut self, reader: R) -> &mut Self {
119100 self.inputs.push(Input::from_reader(reader));
120101 self
121102 }
122103
123− /// Add a custom reader as an input (with customized name)
124− #[deprecated]
125− pub fn input_from_reader_with_name<R: Read + 'a>(
126− &mut self,
127− reader: R,
128− name: impl AsRef<OsStr>,
129− ) -> &mut Self {
130− self.inputs
131− .push(Input::from_reader(reader).name(name).kind("File"));
132− self
133− }
134−
135104 /// Specify the syntax file which should be used (default: auto-detect)
136105 pub fn language(&mut self, language: &'a str) -> &mut Self {
137106 self.config.language = Some(language);
@@ -188,19 +157,9 @@ impl<'a> PrettyPrinter<'a> {
188157
189158 /// Whether to show modification markers for VCS changes. This has no effect if
190159 /// the `git` feature is not activated.
191− #[cfg_attr(
192− not(feature = "git"),
193− deprecated(
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."
196− )
197− )]
198− #[allow(unused_variables)]
160+ #[cfg(feature = "git")]
199161 pub fn vcs_modification_markers(&mut self, yes: bool) -> &mut Self {
200− #[cfg(feature = "git")]
201− {
202− self.active_style_components.vcs_modification_markers = yes;
203− }
162+ self.active_style_components.vcs_modification_markers = yes;
204163 self
205164 }
206165