Skip to content

Commit

Permalink
Fix x86_64-pc-windows-msvc build
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev committed Oct 11, 2023
1 parent 8299a6e commit edcf171
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/torii/core/src/sql.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::convert::TryInto;
use std::str::FromStr;

use anyhow::{anyhow, Result};
Expand Down Expand Up @@ -84,7 +85,10 @@ impl Sql {
packed_size: u8,
unpacked_size: u8,
) -> Result<()> {
let layout_blob = layout.iter().map(|x| (*x).try_into().unwrap()).collect::<Vec<u8>>();
let layout_blob = layout
.iter()
.map(|x| <FieldElement as TryInto<u8>>::try_into(*x).unwrap())
.collect::<Vec<u8>>();
self.query_queue.push(format!(
"INSERT INTO models (id, name, class_hash, layout, packed_size, unpacked_size) VALUES \
('{id}', '{name}', '{class_hash:#x}', '{layout}', '{packed_size}', \
Expand Down

0 comments on commit edcf171

Please sign in to comment.