Skip to content

Commit 294b5e4

Browse files
committed
Fix warnings
1 parent 0e14878 commit 294b5e4

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

lib/mongo/grid_fs/bucket.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,17 @@ defmodule Mongo.GridFs.Bucket do
121121
Mongo.find(topology_pid, files_collection_name(bucket), filter, opts)
122122
end
123123

124+
124125
@doc """
125-
Finds one file document with the file_id as a string
126+
Finds one file document by `file_id` specified either as a string or `BSON.ObjectId`.
126127
"""
128+
def find_one(bucket, file_id)
129+
127130
@spec find_one(Bucket.t, String.t) :: BSON.document | nil
128131
def find_one(%Bucket{} = bucket, file_id) when is_binary(file_id) do
129132
find_one(bucket, ObjectId.decode!(file_id))
130133
end
131134

132-
@doc """
133-
Finds one file document with the file_id as an ObjectID-struct
134-
"""
135135
@spec find_one(Bucket.t, BSON.ObjectId.t) :: BSON.document | nil
136136
def find_one(%Bucket{topology_pid: topology_pid, opts: opts} = bucket, %BSON.ObjectId{} = oid) do
137137
Mongo.find_one(topology_pid, files_collection_name(bucket), %{"_id" => oid}, opts)

mix.exs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ defmodule Mongodb.Mixfile do
2828
defp elixirc_paths(_), do: ["lib"]
2929

3030
def application() do
31-
[applications: applications(Mix.env),
32-
mod: {Mongo.App, []},
33-
env: []]
31+
[
32+
applications: applications(Mix.env),
33+
env: [],
34+
extra_applications: [:crypto, :ssl],
35+
mod: {Mongo.App, []}
36+
]
3437
end
3538

3639
def applications(:test), do: [:logger, :connection, :db_connection]

0 commit comments

Comments
 (0)