Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Run rustfmt #256

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
fn main() {
if cfg!(all(not(target_os = "windows"), not(feature = "no-libffi-linking"))) {
if cfg!(all(
not(target_os = "windows"),
not(feature = "no-libffi-linking")
)) {
println!("cargo:rustc-link-lib=dylib=ffi");
}
}
7 changes: 4 additions & 3 deletions examples/jit.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
extern crate inkwell;

use inkwell::OptimizationLevel;
use inkwell::builder::Builder;
use inkwell::context::Context;
use inkwell::execution_engine::{ExecutionEngine, JitFunction};
use inkwell::module::Module;
use inkwell::OptimizationLevel;

use std::error::Error;

Expand Down Expand Up @@ -43,7 +43,6 @@ impl<'ctx> CodeGen<'ctx> {
}
}


fn main() -> Result<(), Box<dyn Error>> {
let context = Context::create();
let module = context.create_module("sum");
Expand All @@ -55,7 +54,9 @@ fn main() -> Result<(), Box<dyn Error>> {
execution_engine,
};

let sum = codegen.jit_compile_sum().ok_or("Unable to JIT compile `sum`")?;
let sum = codegen
.jit_compile_sum()
.ok_or("Unable to JIT compile `sum`")?;

let x = 1u64;
let y = 2u64;
Expand Down
Loading