| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package templates | 5 package templates |
| 6 | 6 |
| 7 const GenerateSourceFile = ` | 7 const GenerateSourceFile = ` |
| 8 {{- define "GenerateSourceFile" -}} | 8 {{- define "GenerateSourceFile" -}} |
| 9 //! This file was auto-generated by the Rust bindings generator. | 9 //! This file was auto-generated by the Rust bindings generator. |
| 10 #![allow(bad_style)] | 10 #![allow(bad_style)] |
| 11 #![allow(unused_imports)] | 11 #![allow(unused_imports)] |
| 12 #![allow(unused_variables)] | 12 #![allow(unused_variables)] |
| 13 #![allow(dead_code)] | 13 #![allow(dead_code)] |
| 14 | 14 |
| 15 use mojo::bindings::decoding::Decoder; | 15 use mojo::bindings::decoding; |
| 16 use mojo::bindings::decoding::{Decoder, ValidationError}; |
| 16 use mojo::bindings::encoding; | 17 use mojo::bindings::encoding; |
| 17 use mojo::bindings::encoding::{Context, DataHeaderValue, DATA_HEADER_SIZE, Encod
er}; | 18 use mojo::bindings::encoding::{Context, DataHeaderValue, DATA_HEADER_SIZE, Encod
er}; |
| 18 use mojo::bindings::message; | 19 use mojo::bindings::message; |
| 19 use mojo::bindings::message::MessageHeader; | 20 use mojo::bindings::message::MessageHeader; |
| 20 use mojo::bindings::mojom; | 21 use mojo::bindings::mojom; |
| 21 use mojo::bindings::mojom::{MojomEncodable, MojomPointer, MojomStruct, | 22 use mojo::bindings::mojom::{MojomEncodable, MojomPointer, MojomStruct, |
| 22 MojomUnion, MojomMessage, MojomInterface, | 23 MojomUnion, MojomMessage, MojomInterface, |
| 23 MojomInterfaceSend, MojomInterfaceRecv, | 24 MojomInterfaceSend, MojomInterfaceRecv, |
| 24 MojomMessageOption, UNION_SIZE}; | 25 MojomMessageOption, UNION_SIZE}; |
| 25 | 26 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 50 {{template "GenerateEnum" $enum}} | 51 {{template "GenerateEnum" $enum}} |
| 51 {{end}} | 52 {{end}} |
| 52 | 53 |
| 53 // Interfaces: | 54 // Interfaces: |
| 54 {{range $interface := .Interfaces -}} | 55 {{range $interface := .Interfaces -}} |
| 55 {{template "GenerateInterface" $interface}} | 56 {{template "GenerateInterface" $interface}} |
| 56 {{end}} | 57 {{end}} |
| 57 | 58 |
| 58 {{end}} | 59 {{end}} |
| 59 ` | 60 ` |
| OLD | NEW |