File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,21 +14,21 @@ jobs:
1414 format :
1515 runs-on : ubuntu-latest
1616 steps :
17- - uses : actions/checkout@v3
17+ - uses : actions/checkout@v4
1818 - run : cargo fmt --all -- --check
1919
2020 # no cache needed for cargo outdated
2121 outdated :
2222 runs-on : ubuntu-latest
2323 steps :
24- - uses : actions/checkout@v3
25- - run : cargo install cargo-outdated
24+ - uses : actions/checkout@v4
25+ - run : cargo install --locked cargo-outdated
2626 - run : cargo outdated --exit-code 1
2727
2828 build :
2929 runs-on : ubuntu-latest
3030 steps :
31- - uses : actions/checkout@v3
31+ - uses : actions/checkout@v4
3232 - uses : Swatinem/rust-cache@v2
3333 with :
3434 prefix-key : cargo
3838 clippy :
3939 runs-on : ubuntu-latest
4040 steps :
41- - uses : actions/checkout@v3
41+ - uses : actions/checkout@v4
4242 - uses : Swatinem/rust-cache@v2
4343 with :
4444 prefix-key : cargo
4848 test :
4949 runs-on : ubuntu-latest
5050 steps :
51- - uses : actions/checkout@v3
51+ - uses : actions/checkout@v4
5252 - uses : Swatinem/rust-cache@v2
5353 with :
5454 prefix-key : cargo
Original file line number Diff line number Diff line change 11use image:: ImageFormat ;
2+ use object_store:: ObjectStore ;
23use object_store:: path:: Path ;
34use serde:: Deserialize ;
45use std:: sync:: Arc ;
@@ -10,6 +11,18 @@ pub struct ImageThumbs<T> {
1011 pub ( crate ) settings : Arc < Vec < Params > > ,
1112}
1213
14+ impl < T > ImageThumbs < T > {
15+ pub fn with_store ( object_store : T , settings : Vec < Params > ) -> Self
16+ where
17+ T : ObjectStore ,
18+ {
19+ Self {
20+ client : Arc :: new ( RwLock :: new ( object_store) ) ,
21+ settings : Arc :: new ( settings) ,
22+ }
23+ }
24+ }
25+
1326impl < T > Clone for ImageThumbs < T > {
1427 fn clone ( & self ) -> Self {
1528 Self {
You can’t perform that action at this time.
0 commit comments