Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1444)

Unified Diff: mojom/generators/rust/templates/source.tmpl.go

Issue 2222823002: Rust: Add validation support to code generator (Closed) Base URL: git@github.com:domokit/mojo.git@decoding-test
Patch Set: Double check before land Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojom/generators/rust/templates/interface.tmpl.go ('k') | mojom/generators/rust/templates/struct.tmpl.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojom/generators/rust/templates/source.tmpl.go
diff --git a/mojom/generators/rust/templates/source.tmpl.go b/mojom/generators/rust/templates/source.tmpl.go
index ba044e7890128ed2639b5f05b84c672381ec7a07..0986c0ac80c19de081ef4f27465a60c797841d12 100644
--- a/mojom/generators/rust/templates/source.tmpl.go
+++ b/mojom/generators/rust/templates/source.tmpl.go
@@ -12,7 +12,8 @@ const GenerateSourceFile = `
#![allow(unused_variables)]
#![allow(dead_code)]
-use mojo::bindings::decoding::Decoder;
+use mojo::bindings::decoding;
+use mojo::bindings::decoding::{Decoder, ValidationError};
use mojo::bindings::encoding;
use mojo::bindings::encoding::{Context, DataHeaderValue, DATA_HEADER_SIZE, Encoder};
use mojo::bindings::message;
« no previous file with comments | « mojom/generators/rust/templates/interface.tmpl.go ('k') | mojom/generators/rust/templates/struct.tmpl.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698