Skip to content

Commit 4cb0b46

Browse files
authored
Merge pull request rust-mobile#59 from tyranron/fix-ci-check
Fix compilation for Android targets
2 parents 38186ec + b43ba57 commit 4cb0b46

File tree

2 files changed

+15
-26
lines changed

2 files changed

+15
-26
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,12 @@ jobs:
2828
- i686-linux-android
2929

3030
steps:
31-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
3232

33-
- name: Install Rust ${{ matrix.toolchain }}
34-
uses: actions-rs/toolchain@v1
33+
- uses: dtolnay/rust-toolchain@${{ matrix.toolchain }}
3534
with:
36-
profile: minimal
37-
toolchain: ${{ matrix.toolchain }}
3835
target: ${{ matrix.target }}
3936

40-
- name: Build
41-
uses: actions-rs/cargo@v1
42-
with:
43-
command: build
44-
45-
- name: Generate docs
46-
uses: actions-rs/cargo@v1
47-
with:
48-
command: doc
49-
50-
- name: Run tests
51-
uses: actions-rs/cargo@v1
52-
with:
53-
command: test
37+
- run: cargo build --target=${{ matrix.target }}
38+
- run: cargo doc --target=${{ matrix.target }}
39+
- run: cargo test --target=${{ matrix.target }}

src/lib.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,16 @@ impl<'a> PlatformLogWriter<'a> {
292292

293293
#[cfg(target_os = "android")]
294294
pub fn new(level: Level, tag: &CStr) -> PlatformLogWriter {
295-
Self::new_with_priority(match level {
296-
Level::Warn => LogPriority::WARN,
297-
Level::Info => LogPriority::INFO,
298-
Level::Debug => LogPriority::DEBUG,
299-
Level::Error => LogPriority::ERROR,
300-
Level::Trace => LogPriority::VERBOSE,
301-
})
295+
Self::new_with_priority(
296+
match level {
297+
Level::Warn => LogPriority::WARN,
298+
Level::Info => LogPriority::INFO,
299+
Level::Debug => LogPriority::DEBUG,
300+
Level::Error => LogPriority::ERROR,
301+
Level::Trace => LogPriority::VERBOSE,
302+
},
303+
tag,
304+
)
302305
}
303306

304307
#[cfg(not(target_os = "android"))]

0 commit comments

Comments
 (0)