@@ -2,7 +2,6 @@ use anyhow::{Context, Result};
22use clap:: ArgMatches ;
33use colored:: Colorize ;
44use dialoguer:: { theme:: ColorfulTheme , Confirm , Input , Select } ;
5- use git2:: Repository ;
65use regex:: Regex ;
76use reqwest:: Url ;
87use serde:: { Deserialize , Serialize } ;
@@ -304,7 +303,7 @@ pub async fn exec_non_interactive_init(config: &mut Config, args: &ArgMatches) -
304303 Ok ( ( ) )
305304}
306305
307- pub fn ensure_empty_directory ( project_name : & str , project_path : & Path ) -> Result < ( ) > {
306+ pub fn ensure_empty_directory ( _project_name : & str , project_path : & Path ) -> Result < ( ) > {
308307 if project_path. exists ( ) {
309308 if !project_path. is_dir ( ) {
310309 anyhow:: bail!(
@@ -399,7 +398,7 @@ pub async fn interactive_init() -> Result<TemplateConfig> {
399398 . interact ( ) ?;
400399
401400 let other_index = highlights. len ( ) ;
402- let none_index = highlights. len ( ) + 1 ;
401+ let _none_index = highlights. len ( ) + 1 ;
403402
404403 if client_selection < highlights. len ( ) {
405404 let highlight = & highlights[ client_selection] ;
@@ -503,7 +502,7 @@ fn clone_git_subdirectory(repo_url: &str, subdir: &str, target: &Path, branch: O
503502 let mut fetch_options = git2:: FetchOptions :: new ( ) ;
504503 let mut callbacks = git2:: RemoteCallbacks :: new ( ) ;
505504
506- callbacks. credentials ( |url , username_from_url, allowed_types| {
505+ callbacks. credentials ( |_url , username_from_url, allowed_types| {
507506 if allowed_types. contains ( git2:: CredentialType :: SSH_KEY ) {
508507 if let Some ( username) = username_from_url {
509508 return git2:: Cred :: ssh_key_from_agent ( username) ;
@@ -553,7 +552,7 @@ fn clone_github_template(repo_input: &str, target: &Path) -> Result<()> {
553552 let mut fetch_options = git2:: FetchOptions :: new ( ) ;
554553 let mut callbacks = git2:: RemoteCallbacks :: new ( ) ;
555554
556- callbacks. credentials ( |url , username_from_url, allowed_types| {
555+ callbacks. credentials ( |_url , username_from_url, allowed_types| {
557556 if allowed_types. contains ( git2:: CredentialType :: SSH_KEY ) {
558557 if let Some ( username) = username_from_url {
559558 return git2:: Cred :: ssh_key_from_agent ( username) ;
@@ -623,7 +622,7 @@ fn configure_rust_server(server_dir: &Path, project_name: &str) -> Result<()> {
623622 Ok ( ( ) )
624623}
625624
626- fn create_root_package_json ( root : & Path , project_name : & str , use_local : bool ) -> Result < ( ) > {
625+ fn create_root_package_json ( root : & Path , project_name : & str , _use_local : bool ) -> Result < ( ) > {
627626 let package_json = json ! ( {
628627 "name" : project_name,
629628 "version" : "0.1.0" ,
0 commit comments