Format source code and fix clippy warning (#443)

This commit is contained in:
Bert Belder 2020-08-27 06:07:49 +02:00
parent 6d5686cd7c
commit d90742277d
No known key found for this signature in database
GPG Key ID: 7A77887B2E2ED461
4 changed files with 15 additions and 14 deletions

View File

@ -149,11 +149,13 @@ jobs:
echo "::add-path::$(pwd)/$basename"
- name: Test
run: cargo test -vv --all-targets --locked ${{ env.CARGO_VARIANT_FLAG }}
run:
cargo test -vv --all-targets --locked ${{ env.CARGO_VARIANT_FLAG }}
--target ${{ matrix.config.target }}
- name: Clippy
run: cargo clippy --all-targets --locked ${{ env.CARGO_VARIANT_FLAG }}
run:
cargo clippy --all-targets --locked ${{ env.CARGO_VARIANT_FLAG }}
--target ${{ matrix.config.target }} -- -D clippy::all
- name: Rustfmt
@ -166,7 +168,9 @@ jobs:
- name: Binary publish
uses: softprops/action-gh-release@v1
if: github.repository == 'denoland/rusty_v8' && startsWith(github.ref, 'refs/tags/')
if: >-
github.repository == 'denoland/rusty_v8' &&
startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:

View File

@ -1740,7 +1740,7 @@ bool v8__Module__IsSourceTextModule(const v8::Module& self) {
return ptr_to_local(&self)->IsSourceTextModule();
}
bool v8__Module__IsSyntheticModule(const v8::Module&self) {
bool v8__Module__IsSyntheticModule(const v8::Module& self) {
return ptr_to_local(&self)->IsSyntheticModule();
}
@ -1753,8 +1753,7 @@ const v8::Module* v8__Module__CreateSyntheticModule(
export_names.push_back(ptr_to_local(export_names_raw[i]));
}
return local_to_ptr(v8::Module::CreateSyntheticModule(
isolate, ptr_to_local(module_name), export_names,
evaluation_steps));
isolate, ptr_to_local(module_name), export_names, evaluation_steps));
}
MaybeBool v8__Module__SetSyntheticModuleExport(const v8::Module& self,

View File

@ -1420,10 +1420,7 @@ pub(crate) mod data {
impl ScopeTypeSpecificData {
pub fn is_none(&self) -> bool {
match self {
Self::None => true,
_ => false,
}
matches!(self, Self::None)
}
/// Replaces a `ScopeTypeSpecificData::None` value with the value returned

View File

@ -15,6 +15,7 @@ except ImportError: # For Py3 compatibility
from urllib.error import HTTPError, URLError
from urllib.request import urlopen
def DownloadUrl(url, output_file):
"""Download url into output_file."""
CHUNK_SIZE = 4096