@@ -11,11 +11,10 @@ use crate::reporter::junit::{JunitReporter, JunitReporterVisitor};
1111use crate :: reporter:: terminal:: { ConsoleReporter , ConsoleReporterVisitor } ;
1212use crate :: { CliDiagnostic , CliSession , DiagnosticsPayload , Reporter } ;
1313use pgt_diagnostics:: { Category , category} ;
14- use pgt_fs:: PgTPath ;
1514use std:: borrow:: Borrow ;
1615use std:: ffi:: OsString ;
1716use std:: fmt:: { Display , Formatter } ;
18- use std:: path:: { Path , PathBuf } ;
17+ use std:: path:: PathBuf ;
1918use tracing:: info;
2019
2120/// Useful information during the traversal of files and virtual content
@@ -37,25 +36,17 @@ impl Execution {
3736 }
3837}
3938
40- #[ derive( Debug , Clone , Copy ) ]
41- pub enum ExecutionEnvironment {
42- GitHub ,
43- }
44-
4539/// A type that holds the information to execute the CLI via `stdin
4640#[ derive( Debug , Clone ) ]
4741pub struct Stdin (
42+ #[ allow( unused) ]
4843 /// The virtual path to the file
4944 PathBuf ,
5045 /// The content of the file
5146 String ,
5247) ;
5348
5449impl Stdin {
55- fn as_path ( & self ) -> & Path {
56- self . 0 . as_path ( )
57- }
58-
5950 fn as_content ( & self ) -> & str {
6051 self . 1 . as_str ( )
6152 }
@@ -170,10 +161,6 @@ impl Execution {
170161 }
171162 }
172163
173- pub ( crate ) const fn is_dummy ( & self ) -> bool {
174- matches ! ( self . traversal_mode, TraversalMode :: Dummy )
175- }
176-
177164 /// Whether the traversal mode requires write access to files
178165 pub ( crate ) const fn requires_write_access ( & self ) -> bool {
179166 match self . traversal_mode {
@@ -202,6 +189,7 @@ impl Execution {
202189 false
203190 }
204191
192+ #[ allow( unused) ]
205193 /// Returns [true] if the user used the `--write`/`--fix` option
206194 pub ( crate ) fn is_write ( & self ) -> bool {
207195 match self . traversal_mode {
@@ -232,14 +220,7 @@ pub fn execute_mode(
232220
233221 // don't do any traversal if there's some content coming from stdin
234222 if let Some ( stdin) = execution. as_stdin_file ( ) {
235- let pgt_path = PgTPath :: new ( stdin. as_path ( ) ) ;
236- std_in:: run (
237- session,
238- & execution,
239- pgt_path,
240- stdin. as_content ( ) ,
241- cli_options. verbose ,
242- )
223+ std_in:: run ( session, stdin. as_content ( ) )
243224 } else {
244225 let TraverseResult {
245226 summary,
0 commit comments