mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
Add *_with_name methods
This commit is contained in:
1 parent
53a973e9dd
commit
261a7ea154
5 files changed
+37
-13
No files matched your search
+2
-1
@@ -82,8 +82,9 @@ impl<'a> Input<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_provided_name(&mut self, provided_name: Option<&OsStr>) {
|
||||
pub fn with_name(mut self, provided_name: Option<&OsStr>) -> Self {
|
||||
self.metadata.user_provided_name = provided_name.map(|n| n.to_owned());
|
||||
self
|
||||
}
|
||||
|
||||
pub(crate) fn open<R: BufRead + 'a>(self, stdin: R) -> Result<OpenedInput<'a>> {
|
||||
|
||||
Reference in new issue
Block a user