Fix clippy warnings across CLI codebase (#654)
* Fix clippy warnings across CLI codebase Fixes #653 * Fix remaining items_after_test_module clippy warnings Move functions defined after `mod tests` blocks to before the test modules in recording.rs and webdriver/client.rs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: ctate <366502+ctate@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
ctate
parent
68cebe5192
commit
aba2353112
@@ -23,22 +23,13 @@ impl Drop for LightpandaProcess {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct LightpandaLaunchOptions {
|
||||
pub executable_path: Option<String>,
|
||||
pub proxy: Option<String>,
|
||||
pub port: Option<u16>,
|
||||
}
|
||||
|
||||
impl Default for LightpandaLaunchOptions {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
executable_path: None,
|
||||
proxy: None,
|
||||
port: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn find_lightpanda() -> Option<PathBuf> {
|
||||
// Check PATH via `which`
|
||||
#[cfg(unix)]
|
||||
@@ -89,9 +80,7 @@ pub fn find_lightpanda() -> Option<PathBuf> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn launch_lightpanda(
|
||||
options: &LightpandaLaunchOptions,
|
||||
) -> Result<LightpandaProcess, String> {
|
||||
pub fn launch_lightpanda(options: &LightpandaLaunchOptions) -> Result<LightpandaProcess, String> {
|
||||
let binary_path = match &options.executable_path {
|
||||
Some(p) => PathBuf::from(p),
|
||||
None => find_lightpanda().ok_or(
|
||||
|
||||
@@ -532,6 +532,7 @@ pub struct BrowserVersionInfo {
|
||||
/// Chromium source) into `cli/cdp-protocol/` and rebuild.
|
||||
///
|
||||
/// Usage: `use super::cdp::types::generated::cdp_page::*;`
|
||||
#[allow(clippy::upper_case_acronyms)]
|
||||
pub mod generated {
|
||||
include!(concat!(env!("OUT_DIR"), "/cdp_generated.rs"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user