Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e48a5e3 authored by Alisher Alikhodjaev's avatar Alisher Alikhodjaev Committed by Automerger Merge Worker
Browse files

The TryFrom should be included unconditionally am: a5d8025b

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1830437

Change-Id: Ie90f88ea4153ae90cc76d7c5042acdb2d5a4f8ea
parents 18a90dcf a5d8025b
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -25,7 +25,7 @@ void generate_rust_packet_preamble(std::ostream& s) {
use bytes::{Bytes, BytesMut, BufMut};
use bytes::{Bytes, BytesMut, BufMut};
use num_derive::{FromPrimitive, ToPrimitive};
use num_derive::{FromPrimitive, ToPrimitive};
use num_traits::{FromPrimitive, ToPrimitive};
use num_traits::{FromPrimitive, ToPrimitive};
use std::convert::TryInto;
use std::convert::{TryFrom, TryInto};
use std::fmt;
use std::fmt;
use thiserror::Error;
use thiserror::Error;
use std::sync::Arc;
use std::sync::Arc;
@@ -138,7 +138,6 @@ bool generate_rust_source_one_file(


    if (opcode_index != nullptr && opcode != nullptr) {
    if (opcode_index != nullptr && opcode != nullptr) {
      opcode_index->try_from_enum_ = opcode;
      opcode_index->try_from_enum_ = opcode;
      out_file << "use std::convert::TryFrom;";
    }
    }
  }
  }