Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos-rs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos-rs
Commits
1ea220ac
Commit
1ea220ac
authored
Dec 10, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix clippy
parent
28f81c05
Pipeline
#18534
passed with stages
in 15 minutes and 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/service/cards/db/mod.rs
src/service/cards/db/mod.rs
+1
-1
src/service/deck.rs
src/service/deck.rs
+1
-1
No files found.
src/service/cards/db/mod.rs
View file @
1ea220ac
...
@@ -18,7 +18,7 @@ impl CardsDB {
...
@@ -18,7 +18,7 @@ impl CardsDB {
/// 业务方通过取到db连接来做业务逻辑
/// 业务方通过取到db连接来做业务逻辑
pub
fn
new
()
->
anyhow
::
Result
<
Self
>
{
pub
fn
new
()
->
anyhow
::
Result
<
Self
>
{
let
workspace
=
env!
(
"CARGO_MANIFEST_DIR"
);
let
workspace
=
env!
(
"CARGO_MANIFEST_DIR"
);
let
db_url
=
format!
(
"{
}/ygopro-database/locales/zh-CN/cards.cdb"
,
workspace
);
let
db_url
=
format!
(
"{
workspace}/ygopro-database/locales/zh-CN/cards.cdb"
);
let
conn
=
DbConn
::
establish_sqlite
(
&
db_url
)
?
;
let
conn
=
DbConn
::
establish_sqlite
(
&
db_url
)
?
;
Ok
(
Self
{
conn
})
Ok
(
Self
{
conn
})
...
...
src/service/deck.rs
View file @
1ea220ac
...
@@ -55,6 +55,6 @@ impl Deck {
...
@@ -55,6 +55,6 @@ impl Deck {
}
}
pub
fn
service
(
param
:
String
)
->
String
{
pub
fn
service
(
param
:
String
)
->
String
{
let
deck
=
Deck
::
from_path
(
format!
(
"deck/{
}"
,
param
))
.unwrap_or_default
();
let
deck
=
Deck
::
from_path
(
format!
(
"deck/{
param}"
))
.unwrap_or_default
();
serde_json
::
to_string
(
&
deck
)
.unwrap_or_default
()
serde_json
::
to_string
(
&
deck
)
.unwrap_or_default
()
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment