@@ -9,8 +9,8 @@ use std::path::PathBuf;
99use std:: time:: Duration ;
1010
1111use clap:: { CommandFactory , Parser , Subcommand } ;
12- use sculk_core :: persist:: { self , Profile } ;
13- use sculk_core :: tunnel:: { IrohTunnel , TunnelConfig , TunnelEvent } ;
12+ use sculk :: persist:: { self , Profile } ;
13+ use sculk :: tunnel:: { IrohTunnel , TunnelConfig , TunnelEvent } ;
1414use tracing_subscriber:: EnvFilter ;
1515
1616const CLAP_STYLES : clap:: builder:: styling:: Styles = clap:: builder:: styling:: Styles :: styled ( )
@@ -41,7 +41,7 @@ enum Commands {
4141 /// 作为房主启动并暴露本地 MC 服务端
4242 Host {
4343 /// 本地 Minecraft 服务端端口
44- #[ arg( short, long, default_value_t = sculk_core :: DEFAULT_MC_PORT ) ]
44+ #[ arg( short, long, default_value_t = sculk :: DEFAULT_MC_PORT ) ]
4545 port : u16 ,
4646 /// 强制重新生成新密钥
4747 #[ arg( long) ]
@@ -67,7 +67,7 @@ enum Commands {
6767 /// 房主提供的 ticket
6868 ticket : String ,
6969 /// 本地给 MC 客户端连接的端口
70- #[ arg( short, long, default_value_t = sculk_core :: DEFAULT_INLET_PORT ) ]
70+ #[ arg( short, long, default_value_t = sculk :: DEFAULT_INLET_PORT ) ]
7171 port : u16 ,
7272 /// 路径状态打印间隔(秒,默认 0: 仅变化时输出)
7373 #[ arg( short, long, default_value_t = 0 ) ]
@@ -138,7 +138,7 @@ async fn run_command(cli: Cli) -> anyhow::Result<()> {
138138 let quoted = format ! ( "\" {ticket_str}\" " ) ;
139139 println ! ( "Ticket: {quoted}" ) ;
140140
141- if sculk_core :: clipboard:: clipboard_copy ( & quoted) {
141+ if sculk :: clipboard:: clipboard_copy ( & quoted) {
142142 println ! ( "(Copied to clipboard)" ) ;
143143 }
144144
@@ -166,7 +166,7 @@ async fn run_command(cli: Cli) -> anyhow::Result<()> {
166166 password,
167167 max_retries,
168168 } => {
169- let ticket: sculk_core :: tunnel:: Ticket =
169+ let ticket: sculk :: tunnel:: Ticket =
170170 ticket. parse ( ) . map_err ( |e| anyhow:: anyhow!( "{e}" ) ) ?;
171171 if let Some ( ref url) = ticket. relay_url {
172172 println ! ( "Relay: {url}" ) ;
@@ -274,7 +274,7 @@ mod tests {
274274 fn parse_join_defaults ( ) {
275275 let cli = Cli :: try_parse_from ( [ "sculk" , "join" , "ticket" ] ) . expect ( "parse join" ) ;
276276 assert ! (
277- matches!( cli. command, Commands :: Join { port, .. } if port == sculk_core :: DEFAULT_INLET_PORT )
277+ matches!( cli. command, Commands :: Join { port, .. } if port == sculk :: DEFAULT_INLET_PORT )
278278 ) ;
279279 }
280280}
0 commit comments